summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorArtem Sidorenko <artem@posteo.de>2016-02-25 22:56:54 +0100
committerArtem Sidorenko <artem@posteo.de>2016-02-29 21:17:48 +0100
commit28ba8ed5f594251604298be89019bd0d105fd49f (patch)
tree321d549e53bb9149f9cee9868dd1d0bccf29114e /config
parent333ad73e765d87fa1ccbd4a361f7f172c790f897 (diff)
downloadgitlab-ce-28ba8ed5f594251604298be89019bd0d105fd49f.tar.gz
Use dedicated relative_url.rb initializer
in order to have it the same way like in omnibus
Diffstat (limited to 'config')
-rw-r--r--config/application.rb8
-rw-r--r--config/initializers/relative_url.rb.sample10
2 files changed, 10 insertions, 8 deletions
diff --git a/config/application.rb b/config/application.rb
index b905f1a3e90..28684a3e578 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -54,14 +54,6 @@ module Gitlab
config.action_view.sanitized_allowed_protocols = %w(smb)
- # Relative URL support
- # WARNING: We recommend using an FQDN to host GitLab in a root path instead
- # of using a relative URL.
- # Documentation: http://doc.gitlab.com/ce/install/relative_url.html
- # Uncomment and customize the following line to run in a non-root path
- #
- # config.relative_url_root = "/gitlab"
-
config.middleware.use Rack::Attack
# Allow access to GitLab API from other domains
diff --git a/config/initializers/relative_url.rb.sample b/config/initializers/relative_url.rb.sample
new file mode 100644
index 00000000000..125297d5385
--- /dev/null
+++ b/config/initializers/relative_url.rb.sample
@@ -0,0 +1,10 @@
+# Relative URL support
+# WARNING: We recommend using an FQDN to host GitLab in a root path instead
+# of using a relative URL.
+# Documentation: http://doc.gitlab.com/ce/install/relative_url.html
+# Copy this file to relative_url.rb and customize it to run in a non-root path
+#
+
+Rails.application.configure do
+ config.relative_url_root = "/gitlab"
+end