##// END OF EJS Templates
Use config.relative_url_root as the default path for session and autologin cookies (#21169)....
Jean-Philippe Lang -
r14494:703d8a478201
parent child
Show More
@@ -272,7 +272,7 class AccountController < ApplicationController
272 cookie_options = {
272 cookie_options = {
273 :value => token.value,
273 :value => token.value,
274 :expires => 1.year.from_now,
274 :expires => 1.year.from_now,
275 :path => (Redmine::Configuration['autologin_cookie_path'] || '/'),
275 :path => (Redmine::Configuration['autologin_cookie_path'] || RedmineApp::Application.config.relative_url_root || '/'),
276 :secure => secure,
276 :secure => secure,
277 :httponly => true
277 :httponly => true
278 }
278 }
@@ -72,7 +72,9 module RedmineApp
72 # can change it (environments/ENV.rb would take precedence over it)
72 # can change it (environments/ENV.rb would take precedence over it)
73 config.log_level = Rails.env.production? ? :info : :debug
73 config.log_level = Rails.env.production? ? :info : :debug
74
74
75 config.session_store :cookie_store, :key => '_redmine_session'
75 config.session_store :cookie_store,
76 :key => '_redmine_session',
77 :path => config.relative_url_root || '/'
76
78
77 if File.exists?(File.join(File.dirname(__FILE__), 'additional_environment.rb'))
79 if File.exists?(File.join(File.dirname(__FILE__), 'additional_environment.rb'))
78 instance_eval File.read(File.join(File.dirname(__FILE__), 'additional_environment.rb'))
80 instance_eval File.read(File.join(File.dirname(__FILE__), 'additional_environment.rb'))
General Comments 0
You need to be logged in to leave comments. Login now