* Strip custom-named credential headers on cross-host redirect
The proxy channel for the messages-format provider sets a custom-named
x-api-key header carrying the operator's real upstream key. The manager's
http.Client followed redirects with no CheckRedirect; net/http strips the
standard Authorization header on a cross-host redirect but not custom-named
ones, so a cross-host 3xx from an operator-configured upstream leaked the
upstream key to the redirect target. Add a CheckRedirect policy that strips
credential headers on host change and a regression test.
Signed-off-by: tonghuaroot <tonghuaroot@gmail.com>
* Add regression test for cross-host proxy header leak
Signed-off-by: tonghuaroot <tonghuaroot@gmail.com>
---------
Signed-off-by: tonghuaroot <tonghuaroot@gmail.com>