Use the correct fallback referrer policy for the empty string case (#34201)

Signed-off-by: Shane Handley <shanehandley@fastmail.com>
This commit is contained in:
shanehandley 2024-11-10 14:26:19 +11:00 committed by GitHub
parent 4da378a987
commit 5e2c7908d0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 5 additions and 189 deletions

View file

@ -5631,7 +5631,7 @@ pub fn determine_policy_for_token(token: &str) -> Option<ReferrerPolicy> {
"default" | "strict-origin-when-cross-origin" => Some(ReferrerPolicy::StrictOriginWhenCrossOrigin),
"origin-when-cross-origin" => Some(ReferrerPolicy::OriginWhenCrossOrigin),
"always" | "unsafe-url" => Some(ReferrerPolicy::UnsafeUrl),
"" => Some(ReferrerPolicy::NoReferrer),
"" => Some(ReferrerPolicy::default()),
_ => None,
}
}