Closed Elyahou closed 5 months ago
yes, so it seems that original implementation with array is to allow repeating headers, and my change break this.
It seems http
support sending an array of value to support repeating headers, so I changed the forward
function accordingly, now the tests pass
So it worked fine with the array too, instead of object? The reason why we use array of raw headers is to preserve all even duplicate headers to make the proxy transparent.
I came across an issue where the
anonymizeProxy
helper function was not working correctly, and upstream proxy was returning 407, even if the username/password was correctly set in the proxy url.I found out that the upstream proxy was not receiving the credential header correctly.
http
andhttps
request should contain header according to the API.With the proposed changes, the
anonymizeProxy
works correctly, and I no longer have errors