We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3878e94 commit 372af72Copy full SHA for 372af72
src/milky/network/http.ts
@@ -92,8 +92,8 @@ class MilkyHttpHandler {
92
93
let inputToken = ''
94
const authHeader = req.headers['authorization']
95
- if (authHeader) {
96
- inputToken = authHeader.split('Bearer ').pop()!
+ if (authHeader?.toLowerCase().startsWith('bearer ')) {
+ inputToken = authHeader.slice(7).trim()
97
this.ctx.logger.info('receive ws header token', inputToken)
98
} else {
99
inputToken = url.searchParams.get('access_token') ?? ''
0 commit comments