node-http-proxy
node-http-proxy copied to clipboard
Re-send request to different URL based on initial response
trafficstars
Hi,
the server I'm proxying the requests to responds with a 307 if we need to send the request to a different URL (and provides the host/path in the response header).
I need to extract the information from the header, proxy the initial request to a different server, and return this response to the client.
As far as I understand, the proxy.on(proxyRes)... method is unable to discard the response and initiate a new request.
Is there any workaround for my problem?
Thanks a lot!
Frank
try to set followRedirects = true which means you want to follow redirects