From 3802006436d6834ee0a8052b22773cb65c4447b5 Mon Sep 17 00:00:00 2001 From: Toon Claes Date: Sun, 11 Mar 2018 22:38:29 +0100 Subject: 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 --- lib/api/helpers/related_resources_helpers.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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 -- cgit v1.2.1