@@ -20,7 +20,7 @@ def stub_user_agent val
2020 end
2121
2222 def reset_config
23- ::SecureHeaders ::Configuration . configure do |config |
23+ ::SecureHeaders ::Configuration . default do |config |
2424 config . hpkp = nil
2525 config . hsts = nil
2626 config . x_frame_options = nil
@@ -139,7 +139,7 @@ def set_security_headers(subject)
139139
140140 context "when disabled by configuration settings" do
141141 it "does not set any headers when disabled" do
142- ::SecureHeaders ::Configuration . configure do |config |
142+ ::SecureHeaders ::Configuration . default do |config |
143143 config . hsts = false
144144 config . hpkp = false
145145 config . x_frame_options = false
@@ -179,7 +179,7 @@ def expect_default_values(hash)
179179 end
180180
181181 it "allows opting out with config" do
182- ::SecureHeaders ::Configuration . configure do |config |
182+ ::SecureHeaders ::Configuration . default do |config |
183183 config . hsts = false
184184 config . csp = false
185185 end
@@ -190,7 +190,7 @@ def expect_default_values(hash)
190190 end
191191
192192 it "produces a hash with a mix of config values, override values, and default values" do
193- ::SecureHeaders ::Configuration . configure do |config |
193+ ::SecureHeaders ::Configuration . default do |config |
194194 config . hsts = { :max_age => '123456' }
195195 config . hpkp = {
196196 :enforce => true ,
@@ -205,7 +205,7 @@ def expect_default_values(hash)
205205 end
206206
207207 hash = SecureHeaders ::header_hash ( :csp => { :default_src => "'none'" , :img_src => "data:" } )
208- ::SecureHeaders ::Configuration . configure do |config |
208+ ::SecureHeaders ::Configuration . default do |config |
209209 config . hsts = nil
210210 config . hpkp = nil
211211 end
0 commit comments