NelmioSecurityBundle icon indicating copy to clipboard operation
NelmioSecurityBundle copied to clipboard

Do not add signatures if `unsafe-inline` is enabled

Open fritzmg opened this issue 2 years ago • 0 comments

Currently signatures are explicitly still added, even if unsafe-inline was already present in the script-src or style-src directive. However, if your application adds a lot of hashes (for style="…" for example) and you decide to instead allow unsafe-inline in general, the hashes are still output in the response header. This might lead to the response header size being too large, if there are a lot of long hashes for example

This PR would automatically not apply any signatures, if unsafe-inline was enabled.

wdyt?

fritzmg avatar Jan 22 '24 15:01 fritzmg