-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Modernize Rack::Protection::ContentSecurityPolicy #1202
Conversation
Adds complete set of directives that are currently supported by browsers that support CSP Level 2 and Level 3 (draft). Also supports directives that don't take any arguments. The directives in the content security policy output are now sorted.
The Travis CI build failures above are unrelated to these commits. From the build logs: https://travis-ci.org/sinatra/sinatra/builds/173822296
|
Travis failing is related to #1199 |
This will be succeed because g++-4.8 is now available on ubuntu-trusty. |
img_src: "'self'", style_src: "'self'", | ||
connect_src: "'self'", report_only: false | ||
|
||
DIRECTIVES = [:base_uri, :child_src, :connect_src, :default_src, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about use %i(..) for the list directives ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, see d547b7f
Issue #1201 Modernizes Rack::Protection::ContentSecurityPolicy to support current CSP2 and CSP3 directives.
Issue #1200 Fixes a minor security warning on
bundle install
in a fresh repo.Removes inline docs which were incomplete and insufficient for what is now
quite complex in CSP2 and CSP3. Adds additional current links to excellent
doc resources and tools.