Skip to content

Commit

Permalink
CSP: Move 'worker-src' onto 'script-src'
Browse files Browse the repository at this point in the history
Based on the discussion in w3c/webappsec-csp#146,
we're deprecating 'child-src' and moving 'worker-src' onto 'script-src'.

Intent to Ship: https://groups.google.com/a/chromium.org/d/msg/blink-dev/npKDoKVOUAs/ogtlIFmLBAAJ

BUG=662930,694525

Review-Url: https://codereview.chromium.org/2533313002
Cr-Commit-Position: refs/heads/master@{#458026}
  • Loading branch information
mikewest authored and Unknown committed Mar 20, 2017
1 parent 2be566b commit 4f0a760
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/testharness-helper.js"></script>
<meta http-equiv="Content-Security-Policy" content="child-src http://{{host}}:{{ports[http][0]}}">
<meta http-equiv="Content-Security-Policy" content="child-src https://{{host}}:{{ports[https][0]}}">
<script>
var url = new URL("../support/ping.js", document.baseURI).toString();
assert_service_worker_is_loaded(url, "Same-origin service worker allowed by host-source expression.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/testharness-helper.js"></script>
<meta http-equiv="Content-Security-Policy" content="worker-src http://{{host}}:{{ports[http][0]}}; child-src 'none'">
<meta http-equiv="Content-Security-Policy" content="worker-src https://{{host}}:{{ports[https][0]}}; child-src 'none'">
<script>
var url = new URL("../support/ping.js", document.baseURI).toString();
assert_service_worker_is_loaded(url, "Same-origin service worker allowed by host-source expression.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/testharness-helper.js"></script>
<meta http-equiv="Content-Security-Policy" content="worker-src http://{{host}}:{{ports[http][0]}}">
<meta http-equiv="Content-Security-Policy" content="worker-src https://{{host}}:{{ports[https][0]}}">
<script>
var url = new URL("../support/ping.js", document.baseURI).toString();
assert_service_worker_is_loaded(url, "Same-origin service worker allowed by host-source expression.");
Expand Down

0 comments on commit 4f0a760

Please sign in to comment.