Issue #2728 - Remove obsolete CSP referrer policy.

This has been superseded by the dedicated Referrer-policy header.
Resolves #2728
This commit is contained in:
Moonchild 2025-04-24 14:27:39 +02:00 committed by roytam1
commit 0331e633bd
16 changed files with 14 additions and 606 deletions

View file

@ -2424,16 +2424,6 @@ nsDocument::ApplySettingsFromCSP(bool aSpeculative)
rv = NodePrincipal()->GetCsp(getter_AddRefs(csp));
NS_ENSURE_SUCCESS_VOID(rv);
if (csp) {
// Set up any Referrer Policy specified by CSP
bool hasReferrerPolicy = false;
uint32_t referrerPolicy = mozilla::net::RP_Default;
rv = csp->GetReferrerPolicy(&referrerPolicy, &hasReferrerPolicy);
NS_ENSURE_SUCCESS_VOID(rv);
if (hasReferrerPolicy) {
mReferrerPolicy = static_cast<ReferrerPolicy>(referrerPolicy);
mReferrerPolicySet = true;
}
// Set up 'block-all-mixed-content' if not already inherited
// from the parent context or set by any other CSP.
if (!mBlockAllMixedContent) {