mirror of
https://github.com/matrix-org/pantalaimon.git
synced 2025-07-14 10:39:47 -04: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
1 changed files with 3 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue