Attempt to use rails 3 sessions

This commit is contained in:
Ari Timonen 2022-05-20 20:54:50 +03:00
parent 38b58cb4a9
commit b9c5fe7565
2 changed files with 6 additions and 5 deletions

View file

@ -41,8 +41,9 @@ module Ensl
config.autoload_paths += Dir["#{config.root}/app/services/**/", "#{config.root}/app/models/concerns/"]
# Be sure to restart your server when you modify this file.
config.session_store :cookie_store, key: '_ENSL_session_key'
config.session_store :cookie_store, key: '_ENSL_session_key', domain: ENV[ENV['RAILS_ENV'].upcase + "_DOMAIN"]
# config.session_store :my_custom_store, key: '_ENSL_session_key'
config.action_dispatch.cookies_serializer = :marshal
# Load secrets from .env
ENV['APP_SECRET'] ||= (0...32).map { (65 + rand(26)).chr }.join

View file

@ -1,11 +1,11 @@
development:
secret_key_base: <%= ENV["APP_SECRET_KEY_BASE"] %>
secret_token: <%= ENV["APP_SECRET"] %>
test:
secret_key_base: <%= ENV["APP_SECRET_KEY_BASE"] %>
secret_token: <%= ENV["APP_SECRET"] %>
production:
secret_key_base: <%= ENV["APP_SECRET_KEY_BASE"] %>
secret_token: <%= ENV["APP_SECRET"] %>
staging:
secret_key_base: <%= ENV["APP_SECRET_KEY_BASE"] %>
secret_token: <%= ENV["APP_SECRET"] %>