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

Open
baelter opened this Issue Oct 16, 2018 · 4 comments

Comments

Projects
None yet
3 participants
@baelter

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

This comment has been minimized.

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

This comment has been minimized.

Member

namusyaka commented Nov 3, 2018

PR is welcome ;)

@jkowens jkowens referenced a pull request that will close this issue Nov 4, 2018

Open

Allow CSP to fallback to default-src #1490

@jkowens

This comment has been minimized.

Member

jkowens commented Nov 4, 2018

@namusyaka PR submitted 😃

@namusyaka

This comment has been minimized.

Member

namusyaka commented Nov 5, 2018

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

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