diff options
Diffstat (limited to 'config/initializers/default_url_options.rb')
-rw-r--r-- | config/initializers/default_url_options.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/config/initializers/default_url_options.rb b/config/initializers/default_url_options.rb new file mode 100644 index 00000000000..f9f88f95db9 --- /dev/null +++ b/config/initializers/default_url_options.rb @@ -0,0 +1,11 @@ +default_url_options = { + host: Gitlab.config.gitlab.host, + protocol: Gitlab.config.gitlab.protocol, + script_name: Gitlab.config.gitlab.relative_url_root +} + +unless Gitlab.config.gitlab_on_standard_port? + default_url_options[:port] = Gitlab.config.gitlab.port +end + +Gitlab::Application.routes.default_url_options = default_url_options |