Skip to content

Instantly share code, notes, and snippets.

View WaPoNe's full-sized avatar
🏅
Magento 2 Associate Developer

Michele Fantetti WaPoNe

🏅
Magento 2 Associate Developer
View GitHub Profile
@WaPoNe
WaPoNe / onename.txt
Last active February 28, 2016 22:30
Onename
Verifying that +wapone is my blockchain ID. https://onename.com/wapone
@WaPoNe
WaPoNe / magento-csp-report-to-deprecated.patch
Created October 18, 2024 11:01
This is a patch to apply on Magento CSP module to fix a bug regarding 'Report-To' header that is deprecated
diff --git a/vendor/magento/module-csp/Model/Policy/Renderer/SimplePolicyHeaderRenderer.php b/vendor/magento/module-csp/Model/Policy/Renderer/SimplePolicyHeaderRenderer.php
index d419c25..f758333 100644
--- a/vendor/magento/module-csp/Model/Policy/Renderer/SimplePolicyHeaderRenderer.php
+++ b/vendor/magento/module-csp/Model/Policy/Renderer/SimplePolicyHeaderRenderer.php
@@ -45,17 +45,9 @@ class SimplePolicyHeaderRenderer implements PolicyRendererInterface
$header = 'Content-Security-Policy';
}
$value = $policy->getId() .' ' .$policy->getValue() .';';
- if ($config->getReportUri() && !$response->getHeader('Report-To')) {
- $reportToData = [