Commit eb8597a1 authored by Kamil Trzciński's avatar Kamil Trzciński

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

Fix authorization for interactive web terminals

See merge request gitlab-org/gitlab-ce!20811
parents 84626f0d 18a1bcf8
...@@ -17,7 +17,7 @@ module Ci ...@@ -17,7 +17,7 @@ module Ci
{ {
subprotocols: ['terminal.gitlab.com'].freeze, subprotocols: ['terminal.gitlab.com'].freeze,
url: "#{url}/exec".sub("https://", "wss://"), url: "#{url}/exec".sub("https://", "wss://"),
headers: { Authorization: authorization.presence }.compact, headers: { Authorization: [authorization.presence] }.compact,
ca_pem: certificate.presence ca_pem: certificate.presence
} }
end end
......
---
title: Fix authorization for interactive web terminals
merge_request: 20811
author:
type: fixed
...@@ -29,7 +29,7 @@ describe Ci::BuildRunnerSession, model: true do ...@@ -29,7 +29,7 @@ describe Ci::BuildRunnerSession, model: true do
it 'adds Authorization header if authorization is present' do it 'adds Authorization header if authorization is present' do
subject.authorization = 'whatever' subject.authorization = 'whatever'
expect(terminal_specification[:headers]).to include(Authorization: 'whatever') expect(terminal_specification[:headers]).to include(Authorization: ['whatever'])
end end
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment