Skip to content

Commit

Permalink
fix(pod-exec): fix for 403 throws (#543)
Browse files Browse the repository at this point in the history
  • Loading branch information
Antoninbln authored and silasbw committed Nov 3, 2019
1 parent 96fa555 commit 88c43d8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions backends/request/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ function upgradeRequest (options, cb) {
const queryParams = qs.stringify(options.qs, { indices: false })
const wsUrl = urljoin(options.baseUrl, options.uri, `?${queryParams}`)
const protocol = 'base64.channel.k8s.io'

// Passing authorization header
options.headers = {
...options.headers,
authorization: `Bearer ${options.auth.bearer}`
}
const ws = new WebSocket(wsUrl, protocol, options)

const messages = []
Expand Down

0 comments on commit 88c43d8

Please sign in to comment.