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

Remove Rack::Protection::ContentSecurityPolicy defaults #1484

Closed
baelter opened this issue Oct 16, 2018 · 4 comments · Fixed by #1490
Closed

Remove Rack::Protection::ContentSecurityPolicy defaults #1484

baelter opened this issue Oct 16, 2018 · 4 comments · Fixed by #1490

Comments

@baelter
Copy link
Contributor

baelter commented Oct 16, 2018

Rack::Protection::ContentSecurityPolicy has script-src and style-src defaults making it impossible leave them out of the header to have them fallback to default-src.

@jkowens
Copy link
Member

jkowens commented Oct 29, 2018

After reading some docs, I agree that a better default would be to set default-src: "'self'" and to remove defaults for script-src, style-src, img-src, connect-src.

default_options default_src: :none, script_src: "'self'",

If stricter settings needed to be used, those options could be explicitly set when loading this middleware.

@namusyaka
Copy link
Member

PR is welcome ;)

@jkowens
Copy link
Member

jkowens commented Nov 4, 2018

@namusyaka PR submitted 😃

@namusyaka
Copy link
Member

@jkowens Good job! I'll take a look later!

@jkowens jkowens added this to the v2.1.0 milestone Aug 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants