🚀 Feature Proposal
Add the ability to set a custom authorization header.
If a header property exists in options then use basic-auths auth.parse() method rather than auth().
Motivation
Some of our services sit behind an API Gateway that transfers incoming authorization headers onto a custom x-forwarded-authorization header. Unfortunately that API Gateway does not provide basic authentication checks 🤷 , so authentication still needs to be done within the service. (there are other benefits to the Gateway in case you are wondering 😄 ).
Example
fastify.register(basicAuth, { validate, authenticate, header: 'x-forwarded-authorization` }
🚀 Feature Proposal
Add the ability to set a custom authorization header.
If a
headerproperty exists in options then use basic-authsauth.parse()method rather thanauth().Motivation
Some of our services sit behind an API Gateway that transfers incoming
authorizationheaders onto a customx-forwarded-authorizationheader. Unfortunately that API Gateway does not provide basic authentication checks 🤷 , so authentication still needs to be done within the service. (there are other benefits to the Gateway in case you are wondering 😄 ).Example