Issue Task Under Review Stale

#108396Auto remove CSP directive upgrade-insecure-requests in report header

André Buchmann 12/04/25, 10:58 updated 09/14/26, 08:47

Description

Set the upgrade-insecure-requests directive for a site and have the CSP reporting feature active, then you get an error in the browser console:

The Content Security Policy directive 'upgrade-insecure-requests' is ignored when delivered in a report-only policy.

CSP Config config/sites/<my-site>/csp.yml</my-site>

inheritDefault: true
mutations:
  - mode: set
    directive: upgrade-insecure-requests

Enable both CSP Headers:

    'SYS' => [
        'features' => [
            'security.frontend.enforceContentSecurityPolicy' => true,
            'security.frontend.reportContentSecurityPolicy' => true,
        ],
    ],

I propose to automatically remove this directive for the report-only CSP header.

Reviews 1

History 37

  1. Gerrit Code Review pushed patch set 1 for main to change 93733 status Accepted Under Review <span data-processor="relativetime" data-value="2026-04-18T21:13:43+00:00" > 04/18/26, 21:13 </span>