Tighten up cookie security
Mark all cookies as Secure, and the cookies which are not modified client side as HttpOnly.
This commit is contained in:
parent
56a2aa8efa
commit
f91dd6afc2
3 changed files with 4 additions and 11 deletions
|
@ -26,11 +26,6 @@ csp_policy[:img_src] << Settings.storage_url if Settings.key?(:storage_url)
|
|||
|
||||
csp_policy[:report_uri] << Settings.csp_report_url if Settings.key?(:csp_report_url)
|
||||
|
||||
cookie_policy = {
|
||||
:secure => SecureHeaders::OPT_OUT,
|
||||
:httponly => SecureHeaders::OPT_OUT
|
||||
}
|
||||
|
||||
SecureHeaders::Configuration.default do |config|
|
||||
config.hsts = SecureHeaders::OPT_OUT
|
||||
|
||||
|
@ -44,6 +39,4 @@ SecureHeaders::Configuration.default do |config|
|
|||
config.csp = SecureHeaders::OPT_OUT
|
||||
config.csp_report_only = SecureHeaders::OPT_OUT
|
||||
end
|
||||
|
||||
config.cookies = cookie_policy
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue