Update internal/api/client/streaming/stream.go

Co-authored-by: Ilia Pozdnyakov <iliazeus@proton.me>
This commit is contained in:
kim 2025-04-14 13:47:02 +01:00 committed by GitHub
commit f5d34f4d67
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -166,7 +166,7 @@ func (m *Module) StreamGETHandler(c *gin.Context) {
// Chrome also *always* expects the "Sec-Websocket-Protocol"
// response value to match input, so it must always be checked.
queryToken := c.Query(AccessTokenQueryKey)
headerToken := c.Query(AccessTokenHeader)
headerToken := c.GetHeader(AccessTokenHeader)
// Prefer query token else use header token.
token := cmp.Or(queryToken, headerToken)