chore: cookies with "secure" flag (only transmitted through https)

This commit is contained in:
Colin Darie 2024-07-03 11:04:16 +02:00
parent b3ccfc16c4
commit 1eb0bdb4ae
No known key found for this signature in database
GPG key ID: 4FB865FDBCA4BCC4
6 changed files with 10 additions and 7 deletions

View file

@ -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