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

CSP script hashes report only #1356

Merged
merged 4 commits into from
Jul 18, 2024
Merged

CSP script hashes report only #1356

merged 4 commits into from
Jul 18, 2024

Conversation

rBangay
Copy link
Contributor

@rBangay rBangay commented Jul 10, 2024

What does this change?

Rework csp report header to work with inline script hashes and strict-dynamic to allow those inline scripts to load further scripts

More rational around constructing a csp header for an SPA can be found here:

https://auth0.com/blog/deploying-csp-in-spa/

https://web.dev/articles/strict-csp#adopting-a-strict-csp

@rBangay rBangay force-pushed the csp-hash-scripts-report-only branch from 1c9eaa9 to 6fb644d Compare July 10, 2024 15:04
@johnduffell johnduffell changed the title CSP sccript hashes report only CSP script hashes report only Jul 16, 2024
server/server.ts Outdated Show resolved Hide resolved
Copy link
Member

@johnduffell johnduffell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, I've made a minor comment but it doesn't really affect the functionality 👍

Richard Bangay and others added 4 commits July 18, 2024 11:32
…-dynamic to allow those inline scripts to load further scripts
Co-authored-by: John Duffell <john.duffell@guardian.co.uk>
@rBangay rBangay force-pushed the csp-hash-scripts-report-only branch from a7ba63a to 6326486 Compare July 18, 2024 10:33
@rBangay rBangay merged commit 00d654a into main Jul 18, 2024
13 checks passed
@rBangay rBangay deleted the csp-hash-scripts-report-only branch July 18, 2024 10:56
@prout-bot
Copy link
Collaborator

Seen on PROD (merged by @rBangay 9 minutes and 32 seconds ago) Please check your changes!

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

Successfully merging this pull request may close these issues.

3 participants