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

[WebAPI.WebAPI] Fix Content Security Policy header #240

Open
726b opened this issue Aug 24, 2021 · 0 comments
Open

[WebAPI.WebAPI] Fix Content Security Policy header #240

726b opened this issue Aug 24, 2021 · 0 comments

Comments

@726b
Copy link
Contributor

726b commented Aug 24, 2021

Content Security Policy header should contain the following values:

default-src 'none';
base-uri 'none';
object-src 'none';
frame-ancestors 'none';
connect-src 'self' https://www.google.com;
script-src 'self' 'strict-dynamic' 'sha256-CHANGE_THIS' https://www.google.com https://www.gstatic.com;
style-src 'self' https://www.gstatic.com 'unsafe-inline';
frame-src 'self' https://www.google.com;
img-src 'self' data: blob: https://www.gstatic.com;
font-src 'self' data: blob: https://fonts.gstatic.com;
worker-src 'self' https://www.google.com https://www.gstatic.com;
child-src 'self' https://www.google.com https://www.gstatic.com;
media-src 'self';
form-action 'self';
require-trusted-types-for 'script'

Google reCAPTCHA URLs are included and will work by default.

Also, please note that in order to @import fonts from Google Fonts, you should add https://fonts.googleapis.com to style-src.

References:

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

1 participant