-
Notifications
You must be signed in to change notification settings - Fork 252
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
Secure Cookies #231
Secure Cookies #231
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- v7.1.0
- v7.0.0
- v6.7.0
- v6.6.0
- v6.5.0
- v6.4.0
- v6.3.4
- v6.3.3
- v6.3.2
- v6.3.1
- v6.3.0
- v6.2.0
- v6.1.2
- v6.1.1
- v6.1.0
- v6.0.0
- v6.0.0.alpha03
- v6.0.0.alpha02
- v6.0.0.alpha01
- v5.2.0
- v5.1.0
- v5.0.5
- v5.0.4
- v5.0.3
- v5.0.2
- v5.0.1
- v5.0.0.alpha01
- v4.0.2
- v4.0.1
- v4.0.0
- v4.0.0.alpha04
- v4.0.0.alpha03
- v4.0.0.alpha02
- v4.0.0.alpha01
- v3.9.0
- v3.8.0
- v3.7.4
- v3.7.3
- v3.7.2
- v3.7.1
- v3.7.0
- v3.6.7
- v3.6.6
- v3.6.5
- v3.6.4
- v3.6.3
- v3.6.1
- v3.6.0
- v3.5.1
- v3.5.0
- v3.5.0.pre
- v3.4.1
- v3.4.0
- v3.3.2
- v3.3.1
- v3.3.0
- v3.2.0
- v3.1.2
- v3.1.1
- v3.1.0
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ class Railtie < Rails::Railtie | |
'Public-Key-Pins', 'Public-Key-Pins-Report-Only'] | ||
|
||
initializer "secure_headers.middleware" do | ||
Rails.application.config.middleware.use SecureHeaders::Middleware | ||
Rails.application.config.middleware.insert_before 0, SecureHeaders::Middleware | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For this feature to work correctly There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be fine. |
||
end | ||
|
||
initializer "secure_headers.action_controller" do | ||
|
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.
@oreoshake is there an easier way to access the config from this context?
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.
req.env[SECURE_HEADERS_CONFIG]
should suffice.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.
Or maybe make
config_for
public? https://github.com/twitter/secureheaders/blob/44c8c3edfe6c5456274c448ba68371b20fe649d7/lib/secure_headers.rb#L225There 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.
Sounds good to me, will help keep things dry