wpt icon indicating copy to clipboard operation
wpt copied to clipboard

Append to existing CSP list in Document::set_csp_list

Open servo-wpt-sync opened this issue 7 months ago • 0 comments

The Document::set_csp_list method now appends new policies to any existing CspList rather than replacing it. This ensures that CSPs from multiple sources (e.g., HTTP headers and <meta> tags) are merged as expected, following the spec.

This change avoids silently discarding header-defined policies when a <meta http-equiv="Content-Security-Policy"> is present in the document.

Reviewed in servo/servo#36828

servo-wpt-sync avatar May 05 '25 00:05 servo-wpt-sync