Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Heroku - proxy server not working with browser #858
I have the following code in my heroku app:
And then I'm trying to use this server along with a browser (e.g. Chrome) using appname.herokuapp.com:80 or using the port returned by console log function but only using the port 80 works yet it only says that the app doesn't exists when it does.
When running in the Heroku environment, your app is already behind a proxy. The Heroku proxy is bound to appname.herokuapp.com:80, and forwards requests to your app dyno, which is bound to some randomly assigned port.
What exactly are you trying to do? Setting target to req.url seems quite odd.
What I'm trying to do is to setup a caching proxy server like squid in heroku. Then I want to be able to use that proxy server on any browser like 111.222.333.444:80.
I don't know exactly what I'm doing since I never used nodejs but from what I can see, that piece of code makes a request from the url I'm trying to access, say google.com, and then returns the response to heroku and so to my browser right?
I'm aware that heroku already use a proxy yet I don't know how it works.