express-basic-auth icon indicating copy to clipboard operation
express-basic-auth copied to clipboard

feat: add Proxy-Authorization support

Open shazron opened this issue 4 years ago • 1 comments

When using express as a proxy server using node-http-proxy, and express-basic-auth as middleware, this middleware needs to get the authorization from the Proxy-Authentication header instead.

This is described in the example in your basic-auth dependency: https://github.com/jshttp/basic-auth#example

shazron avatar Aug 30 '21 09:08 shazron

Thanks for the PR! This looks like it should be supported, I am just not too sure about the exact options format yet. We should probably make the steps clearer if we have that conditional by first reading from a header which is switched based on some option and then always using parse. as that is what auth(req) does under the hood anyways, but it is not immediately clear when reading that ternary.

LionC avatar Nov 24 '21 09:11 LionC