summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/application.rb4
-rw-r--r--config/gitlab.yml.example1
-rw-r--r--config/initializers/session_store.rb3
3 files changed, 7 insertions, 1 deletions
diff --git a/config/application.rb b/config/application.rb
index d86fe561fa9..f3edca8c353 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -67,5 +67,9 @@ module Gitlab
# Version of your assets, change this if you want to expire all your assets
config.assets.version = '1.0'
+
+ # Uncomment this if you are using a subdirectory
+ # Note that ENV['RAILS_RELATIVE_URL_ROOT'] in config/puma.rb may need to be changed
+ # config.relative_url_root = "/gitlab"
end
end
diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example
index b6a8e68bf8e..c73307cabf4 100644
--- a/config/gitlab.yml.example
+++ b/config/gitlab.yml.example
@@ -21,6 +21,7 @@ production: &base
# WARNING: This feature is no longer supported
# Uncomment and customize to run in non-root path
# Note that ENV['RAILS_RELATIVE_URL_ROOT'] in config/puma.rb may need to be changed
+ # You need to uncomment config.relative_url_root in config/application.rb
# relative_url_root: /gitlab
# Uncomment and customize if you can't use the default user to run GitLab (default: 'git')
diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb
index e777ae2b78d..52a099c3e16 100644
--- a/config/initializers/session_store.rb
+++ b/config/initializers/session_store.rb
@@ -2,7 +2,8 @@
Gitlab::Application.config.session_store :cookie_store, key: '_gitlab_session',
secure: Gitlab::Application.config.force_ssl,
- httponly: true
+ httponly: true,
+ path: (Rails.application.config.relative_url_root.nil?) ? '/' : Rails.application.config.relative_url_root
# Use the database for sessions instead of the cookie-based default,
# which shouldn't be used to store highly confidential information