diff options
author | Michael Howell <michael@notriddle.com> | 2019-09-28 19:42:40 +0000 |
---|---|---|
committer | Michael Howell <michael@notriddle.com> | 2019-10-16 19:46:45 +0000 |
commit | b8f3e8bb2e9bed269a06134c902a139cfa42eb1c (patch) | |
tree | 01351cae22488ad49307a5a51f141ba3e29274b2 /components/script/dom/request.rs | |
parent | 6d488f1be24c1b679931d6d02703f4a10759eb49 (diff) | |
download | servo-b8f3e8bb2e9bed269a06134c902a139cfa42eb1c.tar.gz servo-b8f3e8bb2e9bed269a06134c902a139cfa42eb1c.zip |
Add simple implementation of content-security-policy on scripts / styles
This needs a lot more hooks before it'll actually be a good
implementation, but for a start it can help get some feedback on if this
is the right way to go about it.
Part of servo/servo#4577
Diffstat (limited to 'components/script/dom/request.rs')
-rw-r--r-- | components/script/dom/request.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/components/script/dom/request.rs b/components/script/dom/request.rs index 5393288c633..d22d4680355 100644 --- a/components/script/dom/request.rs +++ b/components/script/dom/request.rs @@ -755,7 +755,9 @@ impl Into<RequestDestination> for NetTraitsRequestDestination { NetTraitsRequestDestination::Object => RequestDestination::Object, NetTraitsRequestDestination::Report => RequestDestination::Report, NetTraitsRequestDestination::Script => RequestDestination::Script, - NetTraitsRequestDestination::ServiceWorker => { + NetTraitsRequestDestination::ServiceWorker | + NetTraitsRequestDestination::AudioWorklet | + NetTraitsRequestDestination::PaintWorklet => { panic!("ServiceWorker request destination should not be exposed to DOM") }, NetTraitsRequestDestination::SharedWorker => RequestDestination::Sharedworker, |