node-http-proxy icon indicating copy to clipboard operation
node-http-proxy copied to clipboard

setRedirectHostRewrite options.target support URL Object

Open ksky521 opened this issue 4 years ago • 1 comments
trafficstars

in https://github.com/http-party/node-http-proxy/blob/master/lib/http-proxy/index.js#L64-L65 options.target can use URL instance:

const url = new URL(req.url);
proxyServer.web(req, res, {
    target: url
});

https://github.com/http-party/node-http-proxy/blob/master/lib/http-proxy/passes/web-outgoing.js#L54 don't support URL instance

ksky521 avatar Apr 14 '21 02:04 ksky521

Hi. This is possible with unjs/httpxy fork to pass a URL.

pi0 avatar Sep 01 '23 18:09 pi0