Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The plugin adds nonce header everytime #3

Open
zooks opened this issue Nov 16, 2022 · 1 comment
Open

The plugin adds nonce header everytime #3

zooks opened this issue Nov 16, 2022 · 1 comment

Comments

@zooks
Copy link

zooks commented Nov 16, 2022

Hi, nice handy plugin. But I faced with a problem. I want to use plugin without scanning resources, with only setting Base Rules. But it adds "nonce" directive to content-security-policy header (style-src). And it ruins all queries with my 'unsafe-inline' setting.

Refused to apply inline style because it violates the following Content Security Policy directive: "style-src 'self' 'unsafe-inline' https: 'nonce-469a42804b5a65f69e0e5cbde9594d1dc1691ab13c01ba1ed2f542b6c7571ab3' 'report-sample'". Note that 'unsafe-inline' is ignored if either a hash or nonce value is present in the source list.

content-security-policy: upgrade-insecure-requests; default-src 'none'; script-src 'self' 'unsafe-inline' https: 'nonce-469a42804b5a65f69e0e5cbde9594d1dc1691ab13c01ba1ed2f542b6c7571ab3'; style-src 'self' 'unsafe-inline' https: 'nonce-469a42804b5a65f69e0e5cbde9594d1dc1691ab13c01ba1ed2f542b6c7571ab3' 'report-sample'; img-src 'self' data: https:; font-src 'self' data: https:; connect-src 'self'; media-src 'self'; object-src 'none'; prefetch-src 'none'; child-src 'self'; frame-src 'self' https:; worker-src 'self'; manifest-src 'self'; base-uri 'none'; form-action 'self'; frame-ancestors 'none';

"External source csp mode" was set to "none".

@MocioF
Copy link
Owner

MocioF commented Nov 27, 2022

Hi @zooks ,
using 'unsafe-inline' is not how "No-unsafe-inline" is intended to be used.
However, if you don't whitelist any inline script, can you try to set inline_scripts_mode to something different from "nonce" (sha256)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants