File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,10 @@ def directive_value(directive)
5454 end
5555
5656 def merge ( new_hash )
57- ContentSecurityPolicy . combine_policies ( self . to_h , new_hash )
57+ new_config = self . dup
58+ puts new_config . inspect
59+ new_config . send ( :from_hash , new_hash )
60+ new_config
5861 end
5962
6063 def merge! ( new_hash )
Original file line number Diff line number Diff line change @@ -391,7 +391,7 @@ module SecureHeaders
391391
392392 hash = SecureHeaders . header_hash_for ( request )
393393 expect ( hash [ "Content-Security-Policy" ] ) . to eq ( "default-src 'self'; script-src 'self'" )
394- expect ( hash [ "Content-Security-Policy-Report-Only" ] ) . to eq ( "default-src 'self'; script-src 'self' foo.com" )
394+ expect ( hash [ "Content-Security-Policy-Report-Only" ] ) . to eq ( "default-src 'self'; script-src foo.com" )
395395 end
396396
397397 it "allows you to opt-out of enforced CSP" do
You can’t perform that action at this time.
0 commit comments