Add env variables to change same_site and secure (#2040)

This commit is contained in:
Ahmad Farhat 2020-08-24 14:19:46 -04:00 committed by GitHub
parent b23715c906
commit e5340d2a7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -5,7 +5,9 @@
# The key base was updated as part of 2.3
if Rails.configuration.loadbalanced_configuration
Rails.application.config.session_store :cookie_store, key: '_greenlight-2_3_session',
domain: ENV['GREENLIGHT_SESSION_DOMAIN'] || 'blindside-dev.com'
domain: ENV['GREENLIGHT_SESSION_DOMAIN'] || 'blindside-dev.com',
secure: ENV['COOKIES_SECURE_OFF'].blank?,
same_site: ENV['COOKIES_SAME_SITE'].presence || 'None'
else
Rails.application.config.session_store :cookie_store, key: '_greenlight-2_3_session'
end