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

Add nonce-based CSP header #1907

Merged
merged 2 commits into from
Jul 10, 2023
Merged

Add nonce-based CSP header #1907

merged 2 commits into from
Jul 10, 2023

Conversation

sunaurus
Copy link
Collaborator

Description

As discussed in #1900, let's keep data serialized as before, but use a nonce to protect against malicious scripts.

Also removes unused websocket config related script tag.

@sunaurus
Copy link
Collaborator Author

It's working with both build:prod and build:dev for me (dev works by disabling CSP headers)

Copy link
Member

@dessalines dessalines left a comment

Choose a reason for hiding this comment

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

Thanks!

I just deployed this to https://ds9.lemmy.ml , and everything seems to be working correctly.

@dessalines dessalines merged commit 546f0ad into LemmyNet:main Jul 10, 2023
dessalines pushed a commit that referenced this pull request Jul 10, 2023
* Remove websocket config

* Add nonce based CSP
@sunaurus sunaurus deleted the csp branch July 10, 2023 19:08
@sunaurus sunaurus mentioned this pull request Jul 11, 2023
andrewstuart pushed a commit to andrewstuart/lemmy-ui that referenced this pull request Jul 27, 2023
* Remove websocket config

* Add nonce based CSP
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

Successfully merging this pull request may close these issues.

3 participants