Skip to content

Commit 756b616

Browse files
committed
Fix merge to remove old code
1 parent b3ac1ad commit 756b616

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

lib/secure_headers/headers/content_security_policy.rb

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -172,24 +172,6 @@ def normalize_uri_paths(source_list)
172172
end
173173
end
174174

175-
176-
# Removes duplicates and sources that already match an existing wild card.
177-
#
178-
# e.g. *.github.com asdf.github.com becomes *.github.com
179-
def dedup_source_list(sources)
180-
sources = sources.uniq
181-
wild_sources = sources.select { |source| source =~ STAR_REGEXP }
182-
183-
if wild_sources.any?
184-
sources.reject do |source|
185-
!wild_sources.include?(source) &&
186-
wild_sources.any? { |pattern| File.fnmatch(pattern, source) }
187-
end
188-
else
189-
sources
190-
end
191-
end
192-
193175
# Private: append a nonce to the script/style directories if script_nonce
194176
# or style_nonce are provided.
195177
def populate_nonces(directive, source_list)

0 commit comments

Comments
 (0)