Closed
Description
SecureHeaders
excessively deduplicates sources without taking schemes into account leading to removal of sources that shouldn't be removed.
I think the problem is with dedup_source_list()
which relies on filesystem-like matching.
Expected Header
Content-Security-Policy: default-src 'self' wss://ws.contoso.com *.contoso.com
Actual Header
Content-Security-Policy: default-src 'self' *.contoso.com
Config
SecureHeaders::Configuration.default do |config|
config.csp = {
preserve_schemes: true, # this line doesn't matter, actually
default_src: %w('self' wss://ws.contoso.com *.contoso.com)
}
end