Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Conversation

@SamSaffron
Copy link
Member

@SamSaffron SamSaffron commented Nov 19, 2024

The intent was always to bypass CSP we have no choice with an artifact system and it is sandboxed


response.headers.delete("X-Frame-Options")
response.headers.delete("Content-Security-Policy")
response.headers["Content-Security-Policy"] = "script-src 'unsafe-inline';"
Copy link
Contributor

Choose a reason for hiding this comment

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

Would using the csp_nonce_placeholder helper work as well? (adding it to the script tag in the html heredoc a few lines above - I think nonce=#{view_context.csp_nonce_placeholder} should work)

@SamSaffron SamSaffron merged commit 3ae1e4e into main Nov 19, 2024
6 checks passed
@SamSaffron SamSaffron deleted the fix-csp branch November 19, 2024 09:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants