Merge branch '25990-interactive-web-terminals-authorization' into 'master'

Fix authorization for interactive web terminals

See merge request gitlab-org/gitlab-ce!20811
This commit is contained in:
Kamil Trzciński 2018-07-31 10:34:14 +00:00
commit eb8597a1b9
3 changed files with 7 additions and 2 deletions

View File

@ -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

View File

@ -0,0 +1,5 @@
---
title: Fix authorization for interactive web terminals
merge_request: 20811
author:
type: fixed

View File

@ -29,7 +29,7 @@ describe Ci::BuildRunnerSession, model: true do
it 'adds Authorization header if authorization is present' do
subject.authorization = 'whatever'
expect(terminal_specification[:headers]).to include(Authorization: 'whatever')
expect(terminal_specification[:headers]).to include(Authorization: ['whatever'])
end
end
end