8

I already tried to create a proxy server on heroku using java, python and nodejs but for some reason I can't.

I can only use port 80 so I would need to use the proxy as appname.herokuapp.com:80 but I get the response as "app doesn't exist".

Is this possible or not? Is there any alternative for what I want to do?

Th3lmuu90
  • 1,717
  • 2
  • 15
  • 18

1 Answers1

2

The Heroku routing layer routes your http requests based on the Host header it finds in the HTTP request from your client. And if you have your own endpoint, it at least validates that the Host header content is one of your apps' domains.

If you look at this answer you see that the Host header contains the name of the server you are trying to reach through the proxy server, not the proxy itself.

So there is no way you can run a http proxy server on heroku.

Denis Cornehl
  • 4,104
  • 1
  • 20
  • 24