Prerequisites
🚀 Feature Proposal
While the header option allow setting Proxy-Authorization as source for auth data, we are missing the ability to customize the response header sent to the browser to trigger authentication to Proxy-Authenticate.
I suggest adding an optional header parameter in the authenticate option.
Motivation
When running fastify-basic-auth plugin in a proxy to perform authentication, it should rely on the standard headers Proxy-Authenticate and Proxy-Authorization, leaving WWW-Authenticate and Authorization free for the proxied webapp to use.
Example
options = {
authenticate: { realm: "My Realm", header: "Proxy-Authorization" }
}