TooTallNate / superagent-proxy

`Request#proxy(uri)` superagent extension
154 stars 46 forks source link

Proxy 301 Redirect Problem #25

Open talkquazi opened 7 years ago

talkquazi commented 7 years ago

There is a bug where 301 forwarders are ignored in some situations:

Using TinyProxy the newest superagent and superagent-proxy via an express route which is the pipe(res) output.

  superagent
    .get('https://brandsmartusa.com/samsung/211987/65+class+smart+curved+led+4k+uhd+tv+with+wi+fi.htm')
    .proxy('http://127.0.0.1:8888/')
    .redirects(10)
    .pipe(res);

The result is:

Moved Permanently

The document has moved here. Apache Server at www.brandsmartusa.com Port 443

Removing the proxy call the url loads as expected. I have tested this with multiple proxys all yielding the same result on some websites such as brandsmartusa which appear to be using apache reverse-proxies on their backend.

Note: Calling the same url and proxy using the request npm module loads the page as expected.

mweichert commented 4 years ago

I have the same issue.