diff --git a/config/initializers/100-session_store.rb b/config/initializers/100-session_store.rb index 2a14105c9..e89e764e8 100644 --- a/config/initializers/100-session_store.rb +++ b/config/initializers/100-session_store.rb @@ -1,6 +1,10 @@ # Be sure to restart your server when you modify this file. -Discourse::Application.config.session_store :cookie_store, key: '_forum_session' +Discourse::Application.config.session_store( + :cookie_store, + key: '_forum_session', + path: (Rails.application.config.relative_url_root.nil?) ? '/' : Rails.application.config.relative_url_root +) # Use the database for sessions instead of the cookie-based default, # which shouldn't be used to store highly confidential information