From ae97aae216c0cb7ae85ec4ea7158ecd74d8878e7 Mon Sep 17 00:00:00 2001 From: Ben Anderson Date: Fri, 10 Feb 2023 23:12:41 +1300 Subject: [PATCH] Switch to the default CookieJar session store Deploying this will log everyone out, so we may want to consider an intermediate migration step. --- Gemfile | 3 --- config/initializers/session_store.rb | 7 +------ 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/Gemfile b/Gemfile index 7f2d6c58..a8a747b6 100644 --- a/Gemfile +++ b/Gemfile @@ -8,9 +8,6 @@ gem 'rails', '~> 4.0.0' gem 'devise', '~> 3.2.2' gem 'psych', '~> 2.0.2' # part of stdlib, need newer version for safe_load -# change back to cookie-based store (encrypted) -gem 'activerecord-session_store' - gem 'rubyzip', '1.3.0' gem 'jquery-rails', '~> 3.1.3' diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb index dffa6c51..9084253c 100644 --- a/config/initializers/session_store.rb +++ b/config/initializers/session_store.rb @@ -1,8 +1,3 @@ # Be sure to restart your server when you modify this file. -# NZTrain::Application.config.session_store :cookie_store, :key => '_nztrain-v2_session' - -# Use the database for sessions instead of the cookie-based default, -# which shouldn't be used to store highly confidential information -# (create the session table with "rails generate session_migration") -NZTrain::Application.config.session_store :active_record_store +NZTrain::Application.config.session_store :cookie_store, :key => '_nztrain_session'