From 18a1bcf862e03e1f7f52efb8169521d315d263c5 Mon Sep 17 00:00:00 2001 From: Steve Azzopardi Date: Tue, 24 Jul 2018 14:05:48 +0200 Subject: Fix authorization for web terminals Workhorse was not able to parse the `headers` property since it was expecting a key => array as a structure. Error from workhorse: preAuthorizeHandler: decode authorization response: json: cannot unmarshal string into Go struct field TerminalSettings.Header of type []string Workhorse was not changed since this api is already used for the environment terminals. gitlab-org/gitlab-ce#25990 --- app/models/ci/build_runner_session.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/models') diff --git a/app/models/ci/build_runner_session.rb b/app/models/ci/build_runner_session.rb index 6f3be31d8e1..869dc0ccadf 100644 --- a/app/models/ci/build_runner_session.rb +++ b/app/models/ci/build_runner_session.rb @@ -17,7 +17,7 @@ module Ci { subprotocols: ['terminal.gitlab.com'].freeze, url: "#{url}/exec".sub("https://", "wss://"), - headers: { Authorization: authorization.presence }.compact, + headers: { Authorization: [authorization.presence] }.compact, ca_pem: certificate.presence } end -- cgit v1.2.1