Project

General

Profile

Patch #21169 » session-path-when-using-RAILS_RELATIVE_URL_ROOT_v2.patch

session cookie and autologin cookie path - Daniel Ritz, 2015-11-07 15:40

View differences:

app/controllers/account_controller.rb
cookie_options = {
:value => token.value,
:expires => 1.year.from_now,
:path => (Redmine::Configuration['autologin_cookie_path'] || '/'),
:path => (Redmine::Configuration['autologin_cookie_path'] || RedmineApp::Application.config.relative_url_root || '/'),
:secure => secure,
:httponly => true
}
config/application.rb
# can change it (environments/ENV.rb would take precedence over it)
config.log_level = Rails.env.production? ? :info : :debug
config.session_store :cookie_store, :key => '_redmine_session'
config.session_store :cookie_store,
:key => '_redmine_session',
:path => config.relative_url_root || '/'
if File.exists?(File.join(File.dirname(__FILE__), 'additional_environment.rb'))
instance_eval File.read(File.join(File.dirname(__FILE__), 'additional_environment.rb'))
(2-2/2)