mirror of
https://github.com/matrix-org/pantalaimon.git
synced 2025-01-08 14:18:08 -05:00
fix(daemon): Don't use strip to filter Bearer from auth header
Using strip might remove more than what is intended here.
This commit is contained in:
parent
c89e87c22a
commit
e62cfe068a
@ -418,7 +418,9 @@ class ProxyDaemon:
|
|||||||
access_token = request.query.get("access_token", "")
|
access_token = request.query.get("access_token", "")
|
||||||
|
|
||||||
if not access_token:
|
if not access_token:
|
||||||
access_token = request.headers.get("Authorization", "").strip("Bearer ")
|
access_token = request.headers.get("Authorization", "").replace(
|
||||||
|
"Bearer ", "", 1
|
||||||
|
)
|
||||||
|
|
||||||
return access_token
|
return access_token
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user