diff options
author | Valery Sizov <vsv2711@gmail.com> | 2015-11-16 12:18:31 +0200 |
---|---|---|
committer | Valery Sizov <vsv2711@gmail.com> | 2015-11-16 12:18:31 +0200 |
commit | 9e0d443f9e420a347cb88508c9afebf17454fac1 (patch) | |
tree | 0f5a50e94239d9fc1ee3033dac0b8480a27f531b /config/initializers | |
parent | 5be2191b1a3673659682ce47dfb601d7d36d852c (diff) | |
download | gitlab-ce-9e0d443f9e420a347cb88508c9afebf17454fac1.tar.gz |
Disabling cache for test environment
Diffstat (limited to 'config/initializers')
-rw-r--r-- | config/initializers/session_store.rb | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb index 04ed9e90df5..d7c5432da76 100644 --- a/config/initializers/session_store.rb +++ b/config/initializers/session_store.rb @@ -9,12 +9,14 @@ begin rescue 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: Settings.gitlab['session_expire_delay'] * 60, - path: (Gitlab::Application.config.relative_url_root.nil?) ? '/' : Gitlab::Application.config.relative_url_root -) +unless Rails.env.test? + 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: Settings.gitlab['session_expire_delay'] * 60, + path: (Gitlab::Application.config.relative_url_root.nil?) ? '/' : Gitlab::Application.config.relative_url_root + ) +end |