Skip to content

setRedirectHostRewrite options.target support URL Object#1513

Open
ksky521 wants to merge 3 commits intohttp-party:masterfrom
ksky521:master
Open

setRedirectHostRewrite options.target support URL Object#1513
ksky521 wants to merge 3 commits intohttp-party:masterfrom
ksky521:master

Conversation

@ksky521
Copy link
Copy Markdown

@ksky521 ksky521 commented Apr 14, 2021

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

@pi0
Copy link
Copy Markdown

pi0 commented Sep 1, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants