File tree Expand file tree Collapse file tree 3 files changed +3
-0
lines changed Expand file tree Collapse file tree 3 files changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ def add_noop_configuration
71
71
ALL_HEADER_CLASSES . each do |klass |
72
72
config . send ( "#{ klass ::CONFIG_KEY } =" , OPT_OUT )
73
73
end
74
+ config . dynamic_csp = OPT_OUT
74
75
end
75
76
76
77
add_configuration ( NOOP_CONFIGURATION , noop_config )
Original file line number Diff line number Diff line change @@ -196,6 +196,7 @@ def validate_config!(config)
196
196
# additions = { script_src: %w(google.com)} then idempotent_additions? would return
197
197
# because google.com is already in the config.
198
198
def idempotent_additions? ( config , additions )
199
+ return true if config == OPT_OUT && additions == OPT_OUT
199
200
return false if config == OPT_OUT
200
201
config == combine_policies ( config , additions )
201
202
end
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ module SecureHeaders
38
38
ALL_HEADER_CLASSES . each do |klass |
39
39
expect ( hash [ klass ::CONFIG_KEY ] ) . to be_nil
40
40
end
41
+ expect ( hash . count ) . to eq ( 0 )
41
42
end
42
43
43
44
it "allows you to override X-Frame-Options settings" do
You can’t perform that action at this time.
0 commit comments