Open saedx1 opened 2 years ago
Hi,
I've noticed that if you specify a header for the authorizer and try it locally it won't work; it will still check for the Authorization header rather than the header I specified.
header
authorizer
Authorization
Example:
@app.authorizer(header="Cookie") def authorizer(auth_request): token = auth_request.token
Here, it will not respect "Cookie" and use it as the header for authorization. It will still go for "Authorization".
"Cookie"
"Authorization"
I dug a little bit, and it turned out that it's fixed to Authorization in the code itself.
The behavior is correct when you deploy; the problem is only present locally.
I'm making a PR to create a fix for it.
Thanks
Hi,
I've noticed that if you specify a
header
for theauthorizer
and try it locally it won't work; it will still check for theAuthorization
header rather than the header I specified.Example:
Here, it will not respect
"Cookie"
and use it as the header for authorization. It will still go for"Authorization"
.I dug a little bit, and it turned out that it's fixed to
Authorization
in the code itself.The behavior is correct when you deploy; the problem is only present locally.
I'm making a PR to create a fix for it.
Thanks