diff options
author | themaze75 <maze@novisoft.com> | 2015-06-05 17:16:32 +0000 |
---|---|---|
committer | Eric Maziade <eric@maziade.com> | 2015-06-10 22:10:00 -0400 |
commit | 1d080f57454fda46eb60700a8693cb968e6d557f (patch) | |
tree | f94ed33eccf48632ee52f9095ff7745b56c47cb3 /config/initializers/session_store.rb | |
parent | 84a414fe534ebb60c8e7396c245486be521e2a11 (diff) | |
download | gitlab-ce-1d080f57454fda46eb60700a8693cb968e6d557f.tar.gz |
session_expire_seconds => session_expire_delay
delay is in seconds
more legible code in session_store
Added `GitLab restart required` help block to session_expire_delay
Diffstat (limited to 'config/initializers/session_store.rb')
-rw-r--r-- | config/initializers/session_store.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb index 1603f7561cd..43077fb575e 100644 --- a/config/initializers/session_store.rb +++ b/config/initializers/session_store.rb @@ -1,11 +1,15 @@ # Be sure to restart your server when you modify this file. +if ActiveRecord::Base.connection.active? && ActiveRecord::Base.connection.table_exists?('application_settings') + Settings.gitlab['session_expire_delay'] = ApplicationSetting.current.session_expire_delay +end + Gitlab::Application.config.session_store( :redis_store, # Using the cookie_store would enable session replay attacks. servers: Gitlab::Application.config.cache_store[1].merge(namespace: 'session:gitlab'), # re-use the Redis config from the Rails cache store key: '_gitlab_session', secure: Gitlab.config.gitlab.https, httponly: true, - expire_after: ActiveRecord::Base.connected? && ActiveRecord::Base.connection.table_exists?('application_settings') ? ApplicationSetting.current.session_expire_seconds : Settings.gitlab['session_expire_seconds'], + expire_after: Settings.gitlab['session_expire_delay'] * 60, path: (Rails.application.config.relative_url_root.nil?) ? '/' : Rails.application.config.relative_url_root -) +)
\ No newline at end of file |