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
Pipeline #26860151 passed with stages
in 52 minutes and 39 seconds
......@@ -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
......
---
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
......
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