File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed
Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,9 @@ class ReferrerPolicy
66 VALID_POLICIES = %w(
77 no-referrer
88 no-referrer-when-downgrade
9+ same-origin
10+ strict-origin
11+ strict-origin-when-cross-origin
912 origin
1013 origin-when-cross-origin
1114 unsafe-url
Original file line number Diff line number Diff line change @@ -18,6 +18,24 @@ module SecureHeaders
1818 end . not_to raise_error
1919 end
2020
21+ it "accepts 'same-origin'" do
22+ expect do
23+ ReferrerPolicy . validate_config! ( "same-origin" )
24+ end . not_to raise_error
25+ end
26+
27+ it "accepts 'strict-origin'" do
28+ expect do
29+ ReferrerPolicy . validate_config! ( "strict-origin" )
30+ end . not_to raise_error
31+ end
32+
33+ it "accepts 'strict-origin-when-cross-origin'" do
34+ expect do
35+ ReferrerPolicy . validate_config! ( "strict-origin-when-cross-origin" )
36+ end . not_to raise_error
37+ end
38+
2139 it "accepts 'origin'" do
2240 expect do
2341 ReferrerPolicy . validate_config! ( "origin" )
You can’t perform that action at this time.
0 commit comments