Skip to content

Commit 07c9520

Browse files
author
Tom Gilligan
committed
Disable Referrer-Policy by default for now
1 parent 1fe3cdf commit 07c9520

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/secure_headers/configuration.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ def deep_copy_if_hash(value)
117117

118118
def initialize(&block)
119119
self.hpkp = OPT_OUT
120+
self.referrer_policy = OPT_OUT
120121
self.csp = self.class.send(:deep_copy, CSP::DEFAULT_CONFIG)
121122
instance_eval &block if block_given?
122123
end

spec/spec_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def expect_default_values(hash)
3030
expect(hash[SecureHeaders::XXssProtection::HEADER_NAME]).to eq(SecureHeaders::XXssProtection::DEFAULT_VALUE)
3131
expect(hash[SecureHeaders::XContentTypeOptions::HEADER_NAME]).to eq(SecureHeaders::XContentTypeOptions::DEFAULT_VALUE)
3232
expect(hash[SecureHeaders::XPermittedCrossDomainPolicies::HEADER_NAME]).to eq(SecureHeaders::XPermittedCrossDomainPolicies::DEFAULT_VALUE)
33-
expect(hash[SecureHeaders::ReferrerPolicy::HEADER_NAME]).to eq(SecureHeaders::ReferrerPolicy::DEFAULT_VALUE)
33+
expect(hash[SecureHeaders::ReferrerPolicy::HEADER_NAME]).to be_nil
3434
end
3535

3636
module SecureHeaders

0 commit comments

Comments
 (0)