aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-07-12 13:44:33 -0700
committerGitHub <noreply@github.com>2016-07-12 13:44:33 -0700
commit37dbb502089a4b05eaaa53764a7f37cfe19523c9 (patch)
tree73ebf4e064cec197c22e955eafb8eee6db7a3c27 /components/script/dom
parent74925460952ac070ff5e365b6fe6b886fd81861b (diff)
parent79cc2f70512e32f51b6ef9b8a0de7504bc7c5068 (diff)
downloadservo-37dbb502089a4b05eaaa53764a7f37cfe19523c9.tar.gz
servo-37dbb502089a4b05eaaa53764a7f37cfe19523c9.zip
Auto merge of #11978 - aravind-pg:new-referrer-pols, r=jdm
Add "origin" and "same-origin" referrer policies, replacing "origin-only". <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #11384 - [X] There are tests for these changes <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11978) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom')
-rw-r--r--components/script/dom/document.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs
index 68cd619ba43..669c4d9a31a 100644
--- a/components/script/dom/document.rs
+++ b/components/script/dom/document.rs
@@ -2832,7 +2832,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),