chore: cookies with "secure" flag (only transmitted through https)
This commit is contained in:
parent
b3ccfc16c4
commit
1eb0bdb4ae
6 changed files with 10 additions and 7 deletions
|
@ -24,7 +24,8 @@ module ApplicationController::LongLivedAuthenticityToken
|
|||
cookies.signed[COOKIE_NAME] = {
|
||||
value: csrf_token,
|
||||
expires: 1.year.from_now,
|
||||
httponly: true
|
||||
httponly: true,
|
||||
secure: Rails.env.production?
|
||||
}
|
||||
session[:_csrf_token] = csrf_token
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue