Skip to content

Commit f6ccdc4

Browse files
committed
compact then unique, not vice versa
1 parent f4670eb commit f6ccdc4

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
@@ -218,7 +218,7 @@ def combine_policies(original, additions)
218218
# when each hash contains a value for a given key.
219219
original.merge(additions) do |directive, lhs, rhs|
220220
if source_list?(directive)
221-
(lhs.to_a + rhs.to_a).uniq.compact
221+
(lhs.to_a + rhs.to_a).compact.uniq
222222
else
223223
rhs
224224
end

0 commit comments

Comments
 (0)