Auth: Fix key check coalesce
Prefer the auth-specific headers before the generic authorization header. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
parent
e20a2d504b
commit
38185a1ff4
2 changed files with 2 additions and 2 deletions
|
|
@ -86,9 +86,9 @@ def get_key_permission(request: Request):
|
|||
|
||||
# Hyphens are okay here
|
||||
test_key = coalesce(
|
||||
request.headers.get("authorization"),
|
||||
request.headers.get("x-admin-key"),
|
||||
request.headers.get("x-api-key"),
|
||||
request.headers.get("authorization"),
|
||||
)
|
||||
|
||||
if test_key is None:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue