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:
commit
eb8597a1b9
|
@ -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
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Fix authorization for interactive web terminals
|
||||
merge_request: 20811
|
||||
author:
|
||||
type: fixed
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue