diff --git a/config/application.rb b/config/application.rb index 13489c5..31d575d 100644 --- a/config/application.rb +++ b/config/application.rb @@ -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 diff --git a/config/secrets.yml b/config/secrets.yml index c44a38b..8b02cf8 100644 --- a/config/secrets.yml +++ b/config/secrets.yml @@ -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"] %> \ No newline at end of file + secret_token: <%= ENV["APP_SECRET"] %>