Move processing incoming requests into a function that produces a RequestData object to process the original request and the user credential request with the same function.
Read accounts from the config on reverse proxy start.
When the user sends a request, checks for an authorization header and if it's missing, send a request for auth credentials.
Then check the auth against the accounts and allow or deny access appropriately.
Move processing incoming requests into a function that produces a RequestData object to process the original request and the user credential request with the same function.
Read accounts from the config on reverse proxy start.
When the user sends a request, checks for an authorization header and if it's missing, send a request for auth credentials.
Then check the auth against the accounts and allow or deny access appropriately.