Transparent Reverse Proxy #209

Closed
outaTiME opened this Issue Mar 14, 2012 · 4 comments

Comments

Projects
None yet
2 participants

Hi guys, its possible to make a transparent reverse proxy like apache mod_proxy ??

something like ...

httpProxy.createServer({
  router: {
    'localhost/api': 'api.domain.com',
    'localhost': 'localhost:8081'
  }
}).listen(8080);

i try this but doesnt work for me =(

Contributor

jfhbrook commented Mar 14, 2012

its possible to make a transparent reverse proxy like apache mod_proxy ??

Yes. The only real limitation of the http-proxy is that modifying the response is not expected and takes quite a bit of effort. There is at least one other project that implements this, if it interests you.

i try this but doesnt work for me =(

Try changing the latter to 127.0.0.1 ?

ok, but the first rule never works with this version not ?? its not implemented ... or i misunderstood ??

Contributor

jfhbrook commented Mar 14, 2012

its not implemented ... or i misunderstood ??

I'm still investigating. Will update when I know more.

ok, but the first rule never works with this version not ??

For future reference: The more you tell us from the get-go, the less we have to discover ourselves. Please be as specific in issues as possible. :)

Contributor

jfhbrook commented Mar 14, 2012

@outaTiME I can replicate your issue but it seems to only occur with sites that use https, which is expected.

Try connecting to a site that doesn't attempt to use ssl, such as google.com and it'll work fine.

In your use case (convenience?), not using the proxy and instead responding with 302 redirects, may be enough.

jfhbrook closed this Mar 14, 2012

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