svdgraaf / serverless-basic-authentication

Use Basic Authentication using Api Gateway api-keys
MIT License
22 stars 19 forks source link

lowercase header #8

Closed rgrenonlkr closed 5 years ago

rgrenonlkr commented 5 years ago

Hi,

Following the docs I tested my service with curl. Not sure if my curl sent a lowercase "authorization" header or if aws lowercased it but in the end it is exposed as "authorization". Or the authenticator except a "Authorization" and thus fail.

curl 7.58.0 (x86_64-pc-linux-gnu) libcurl/7.58.0 OpenSSL/1.1.0g zlib/1.2.11 libidn2/2.0.4 libpsl/0.19.1 (+libidn2/2.0.4) nghttp2/1.30.0 librtmp/2.3 Release-Date: 2018-01-24

I don't know if it's a curl bug or if you should handle "Authorization" and "authorization" headers.

svdgraaf commented 5 years ago

Hmmm, interesting. Seems like an easy fix. Not sure if the lowercase header is out of spec actually, I don't think I've ever encountered it :)

svdgraaf commented 5 years ago

I just added this feature and release 0.13.0