Skip to content

Commit 78ecd02

Browse files
committed
This is a hack.
I'm not sure why, but the direct hash comparison with == would fail for arrays that were identical. Calling to_s reliably returns the right value.
1 parent 645696f commit 78ecd02

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/secure_headers/headers/content_security_policy.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def validate_config!(config)
181181
# because google.com is already in the config.
182182
def idempotent_additions?(config, additions)
183183
return false if config == OPT_OUT
184-
config == combine_policies(config, additions)
184+
config.to_s == combine_policies(config, additions).to_s
185185
end
186186

187187
# Public: combine the values from two different configs.

0 commit comments

Comments
 (0)