mirror of
https://github.com/servo/servo.git
synced 2025-08-01 11:40:30 +01:00
net: Add "origin" and "same-origin" referrer policies, replacing "origin-only".
This commit is contained in:
parent
d62de85094
commit
eeccb75fc1
8 changed files with 37 additions and 25 deletions
|
@ -2818,7 +2818,8 @@ pub fn determine_policy_for_token(token: &str) -> Option<ReferrerPolicy> {
|
|||
return match lower.as_ref() {
|
||||
"never" | "no-referrer" => Some(ReferrerPolicy::NoReferrer),
|
||||
"default" | "no-referrer-when-downgrade" => Some(ReferrerPolicy::NoRefWhenDowngrade),
|
||||
"origin" => Some(ReferrerPolicy::OriginOnly),
|
||||
"origin" => Some(ReferrerPolicy::Origin),
|
||||
"same-origin" => Some(ReferrerPolicy::SameOrigin),
|
||||
"origin-when-cross-origin" => Some(ReferrerPolicy::OriginWhenCrossOrigin),
|
||||
"always" | "unsafe-url" => Some(ReferrerPolicy::UnsafeUrl),
|
||||
"" => Some(ReferrerPolicy::NoReferrer),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue