Closed fluggo closed 4 years ago
Further debugging shows that I'm wrong: the Host header is set properly on the third redirect, to talos-intelligence-site.s3.amazonaws.com:443
. The problem here appears to be that S3 rejects the :443
part of the host header, which appears to be a problem on their end, as AFAIK that's allowed. Also, I'm not convinced that this is something that superagent is even responsible for, as that header seems to be sent by the agent anyways.
Sorry to bug you!
I'm using a ProxyAgent from proxy-agent to send requests from superagent through a proxy.
My code boils down to:
This somehow prevents superagent from sending a Host header, which makes this request fail when it redirects to an S3 bucket.