Commit d586b5b7 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Fix redirect loop when relative url root is blank

Sets the cookie path to `/` if RAILS_RELATIVE_URL_ROOT is set to an
empty string

Changelog: fixed
parent f10d4e52
......@@ -27,5 +27,5 @@ Gitlab::Application.config.session_store(
secure: Gitlab.config.gitlab.https,
httponly: true,
expires_in: Settings.gitlab['session_expire_delay'] * 60,
path: Rails.application.config.relative_url_root.nil? ? '/' : Gitlab::Application.config.relative_url_root
path: Rails.application.config.relative_url_root.presence || '/'
)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment