summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
authorToon Claes <toon@gitlab.com>2018-03-11 22:38:29 +0100
committerToon Claes <toon@gitlab.com>2018-03-12 15:34:11 +0100
commit3802006436d6834ee0a8052b22773cb65c4447b5 (patch)
treed169e4fcf0112bbe312fd5fd7e0084d08833dd60 /lib/api
parent4bc58ca210d8c984c20e88c19e74b53e9505905b (diff)
downloadgitlab-ce-3802006436d6834ee0a8052b22773cb65c4447b5.tar.gz
Respect the protocol in `expose_url`
When https is configured in the URL, also use that, and do not set it to http. Closes gitlab-org/gitlab-ee#5217
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/helpers/related_resources_helpers.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/helpers/related_resources_helpers.rb b/lib/api/helpers/related_resources_helpers.rb
index 1f677529b07..7f4d6e58b34 100644
--- a/lib/api/helpers/related_resources_helpers.rb
+++ b/lib/api/helpers/related_resources_helpers.rb
@@ -15,7 +15,7 @@ module API
url_options = Gitlab::Application.routes.default_url_options
protocol, host, port = url_options.slice(:protocol, :host, :port).values
- URI::HTTP.build(scheme: protocol, host: host, port: port, path: path).to_s
+ URI::Generic.build(scheme: protocol, host: host, port: port, path: path).to_s
end
private