@@ -265,11 +265,15 class AccountController < ApplicationController | |||
|
265 | 265 | |
|
266 | 266 | def set_autologin_cookie(user) |
|
267 | 267 | token = Token.create(:user => user, :action => 'autologin') |
|
268 | secure = Redmine::Configuration['autologin_cookie_secure'] | |
|
269 | if secure.nil? | |
|
270 | secure = request.ssl? | |
|
271 | end | |
|
268 | 272 | cookie_options = { |
|
269 | 273 | :value => token.value, |
|
270 | 274 | :expires => 1.year.from_now, |
|
271 | 275 | :path => (Redmine::Configuration['autologin_cookie_path'] || '/'), |
|
272 | :secure => (Redmine::Configuration['autologin_cookie_secure'] ? true : false), | |
|
276 | :secure => secure, | |
|
273 | 277 | :httponly => true |
|
274 | 278 | } |
|
275 | 279 | cookies[autologin_cookie_name] = cookie_options |
General Comments 0
You need to be logged in to leave comments.
Login now