mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Remove SessionCookieUpgrader from middleware
This was a transitional bit of code to allow us to rename our session cookies without killing active sessions and logging users out. It's done it's job, the transition is finished, and it isn't doing anything useful now. It can be removed from the middleware stack.
This commit is contained in:
@@ -34,15 +34,6 @@ end
|
||||
|
||||
module Openfoodnetwork
|
||||
class Application < Rails::Application
|
||||
config.middleware.insert_before(
|
||||
ActionDispatch::Cookies,
|
||||
SessionCookieUpgrader, {
|
||||
old_key: "_session_id",
|
||||
new_key: "_ofn_session_id",
|
||||
domain: ".#{ENV['SITE_URL'].gsub(/^(www\.)|^(app\.)|^(staging\.)|^(stg\.)/, '')}"
|
||||
}
|
||||
) if Rails.env.staging? || Rails.env.production?
|
||||
|
||||
config.after_initialize do
|
||||
# We need this here because the test env file loads before the Spree engine is loaded
|
||||
Spree::Core::Engine.routes.default_url_options[:host] = ENV["SITE_URL"] if Rails.env == 'test'
|
||||
|
||||
Reference in New Issue
Block a user