mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 13:51:18 +08:00
FEATURE: allow extending CSP base-uri and object-src
Plus, ensure :none is stripped, it cannot be combined with other sources
This commit is contained in:
@ -111,6 +111,8 @@ describe ContentSecurityPolicy do
|
||||
|
||||
plugin.enabled = true
|
||||
expect(parse(policy)['script-src']).to include('https://from-plugin.com')
|
||||
expect(parse(policy)['object-src']).to include('https://test-stripping.com')
|
||||
expect(parse(policy)['object-src']).to_not include("'none'")
|
||||
|
||||
plugin.enabled = false
|
||||
expect(parse(policy)['script-src']).to_not include('https://from-plugin.com')
|
||||
|
Reference in New Issue
Block a user