summaryrefslogtreecommitdiff
path: root/app/models/ci/build_runner_session.rb
diff options
context:
space:
mode:
authorSteve Azzopardi <steveazz@outlook.com>2018-07-24 14:05:48 +0200
committerSteve Azzopardi <steveazz@outlook.com>2018-07-30 16:58:59 +0200
commit18a1bcf862e03e1f7f52efb8169521d315d263c5 (patch)
tree70cff92edd1c804c5992d26125b4924d1ff2cda8 /app/models/ci/build_runner_session.rb
parentc90d7633da7837deedd67f344ac8d00ba54c4989 (diff)
downloadgitlab-ce-18a1bcf862e03e1f7f52efb8169521d315d263c5.tar.gz
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
Diffstat (limited to 'app/models/ci/build_runner_session.rb')
-rw-r--r--app/models/ci/build_runner_session.rb2
1 files changed, 1 insertions, 1 deletions
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