Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

Cannot proxy URL's starting with a specific path to a host. #23

Open
claudionunezjr opened this issue Dec 2, 2019 · 0 comments
Open

Comments

@claudionunezjr
Copy link

In the express version of this repository, https://github.com/villadora/express-http-proxy#example, it's possible to do this: app.use('/proxy', proxy('www.google.com')); In Koa, this is not possible. I've set up a koa-router to handle this, but it's not working as expected.

Let's say I set up a GET route to "/proxy" with the second parameter being the proxy to said host. That URL will now be active, but it actually points to (using the above example) "google.com/proxy", not "google.com/" as one would expect a proxy to work, and indeed does work in the express example.

Can the behavior that exists in the express example be replicated using the Koa version of this tool?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant