3e8d77d564
Co-authored-by: deepak1556 <hop2deep@gmail.com> Co-authored-by: Electron Bot <anonymous@electronjs.org> Co-authored-by: Jeremy Apthorp <nornagon@nornagon.net>
19 lines
1.2 KiB
Diff
19 lines
1.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: deepak1556 <hop2deep@gmail.com>
|
|
Date: Thu, 20 Sep 2018 17:47:47 -0700
|
|
Subject: blink-worker-enable-csp-in-file-scheme.patch
|
|
|
|
This allows file:// URLs in workers to have a CSP.
|
|
|
|
diff --git a/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc b/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc
|
|
index e15412a87803f38bceca93cf460386c9fd8e8903..ac09d3997e1018d227178c29f2fd714d9bb4000a 100644
|
|
--- a/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc
|
|
+++ b/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc
|
|
@@ -323,7 +323,6 @@ void WorkerClassicScriptLoader::ProcessContentSecurityPolicy(
|
|
// document (which is implemented in WorkerMessagingProxy, and
|
|
// m_contentSecurityPolicy should be left as nullptr to inherit the policy).
|
|
if (!response.CurrentRequestUrl().ProtocolIs("blob") &&
|
|
- !response.CurrentRequestUrl().ProtocolIs("file") &&
|
|
!response.CurrentRequestUrl().ProtocolIs("filesystem")) {
|
|
content_security_policy_ = MakeGarbageCollected<ContentSecurityPolicy>();
|
|
content_security_policy_->SetOverrideURLForSelf(
|