summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2019-04-30 18:15:13 +0000
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2019-04-30 18:15:13 +0000
commit93a332a620f54038d78bd82ce6f1f553d92b7f46 (patch)
treee725741b7fcd308f8adde2318d221292f4c59b23 /config
parentf4cc9438e3d59f09b9a6f170f89ddd914d1efa4f (diff)
parent565150205cdcb52ee4656d55c8ac3c53fc66d4f3 (diff)
downloadgitlab-ce-93a332a620f54038d78bd82ce6f1f553d92b7f46.tar.gz
Merge branch '60965-referencing-issues-or-epics-by-url-fails-with-404' into 'master'
Resolve "Referencing issues or epics by URL fails with 404" Closes #61099 and #60965 See merge request gitlab-org/gitlab-ce!27827
Diffstat (limited to 'config')
-rw-r--r--config/initializers/1_settings.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb
index e9b36873d75..18c3686e6b4 100644
--- a/config/initializers/1_settings.rb
+++ b/config/initializers/1_settings.rb
@@ -136,6 +136,8 @@ Settings.gitlab['ssh_host'] ||= Settings.gitlab.host
Settings.gitlab['https'] = false if Settings.gitlab['https'].nil?
Settings.gitlab['port'] ||= ENV['GITLAB_PORT'] || (Settings.gitlab.https ? 443 : 80)
Settings.gitlab['relative_url_root'] ||= ENV['RAILS_RELATIVE_URL_ROOT'] || ''
+# / is not a valid relative URL root
+Settings.gitlab['relative_url_root'] = '' if Settings.gitlab['relative_url_root'] == '/'
Settings.gitlab['protocol'] ||= Settings.gitlab.https ? "https" : "http"
Settings.gitlab['email_enabled'] ||= true if Settings.gitlab['email_enabled'].nil?
Settings.gitlab['email_from'] ||= ENV['GITLAB_EMAIL_FROM'] || "gitlab@#{Settings.gitlab.host}"