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?
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?