CSP: include `worker_src`

`worker_src` fallbacks to `script_src`, but #6611 made `script_src` too
restrict to include the service worker.
This commit is contained in:
Kyle Zhao 2018-11-15 12:59:37 -05:00
parent 5f754b43f1
commit 6fba8b8aef
1 changed files with 1 additions and 0 deletions

View File

@ -37,6 +37,7 @@ class ContentSecurityPolicy
@request = request @request = request
@directives = { @directives = {
script_src: script_src, script_src: script_src,
worker_src: [:self],
} }
@directives[:report_uri] = path('/csp_reports') if SiteSetting.content_security_policy_collect_reports @directives[:report_uri] = path('/csp_reports') if SiteSetting.content_security_policy_collect_reports