LeOSium_webview/LeOS/patches/00Disable-csp-reports.patch

38 lines
1.6 KiB
Diff
Raw Normal View History

2023-11-18 11:46:19 +01:00
From: Your Name <you@example.com>
Date: Sun, 26 Feb 2023 19:46:04 +0000
Subject: Disable csp reports
---
third_party/blink/renderer/core/loader/ping_loader.cc | 3 +++
1 file changed, 3 insertions(+)
diff --git a/third_party/blink/renderer/core/loader/ping_loader.cc b/third_party/blink/renderer/core/loader/ping_loader.cc
--- a/third_party/blink/renderer/core/loader/ping_loader.cc
+++ b/third_party/blink/renderer/core/loader/ping_loader.cc
@@ -68,6 +68,7 @@ bool SendBeaconCommon(const ScriptState& state,
LocalFrame* frame,
const KURL& url,
const BeaconData& beacon) {
+ if ((true)) return true;
if (!frame->DomWindow()
->GetContentSecurityPolicyForWorld(&state.World())
->AllowConnectToSource(url, url, RedirectStatus::kNoRedirect)) {
@@ -103,6 +104,7 @@ bool SendBeaconCommon(const ScriptState& state,
void PingLoader::SendLinkAuditPing(LocalFrame* frame,
const KURL& ping_url,
const KURL& destination_url) {
+ if ((true)) return;
if (!ping_url.ProtocolIsInHTTPFamily())
return;
@@ -140,6 +142,7 @@ void PingLoader::SendLinkAuditPing(LocalFrame* frame,
void PingLoader::SendViolationReport(ExecutionContext* execution_context,
const KURL& report_url,
scoped_refptr<EncodedFormData> report) {
+ if ((true)) return;
ResourceRequest request(report_url);
request.SetHttpMethod(http_names::kPOST);
request.SetHTTPContentType(AtomicString("application/csp-report"));
--
2.25.1