echo
echo copied to clipboard
Add authorization header handling in proxy middleware
Problem
When a proxy target URL contains User credentials, proxy middleware does not send request with the authorization header. This can lead to UnAuthorized Error (401) when connecting to upstream server.
Solution
- Implemented logic to pass the Authorization header to the target if the proxy URL includes user credentials.
- Added unit tests to verify behavior for both scenarios: with and without user credentials in the proxy URL.