Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

It is possible to create proxy server on heroku?

Tags:

proxy

heroku

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?

like image 716
Th3lmuu90 Avatar asked May 11 '16 16:05

Th3lmuu90


People also ask

Does heroku use proxy?

By default, heroku-proxy will proxy all requests to /api/* of any method to api.heroku.com via https . You can override the default options by passing an object into the function returned by the heroku-proxy module: app.

Can heroku host a server?

Heroku is a Platform as a Service(PaaS) that makes it easy to deploy servers to the web. Heroku takes pride in its simplicity and ease by which users can take their local servers to production. Heroku has a very intuitive dashboard making it easy for users to deploy their servers.

What is the proxy server?

A proxy server is an intermediary server that retrieves data from an Internet source, such as a webpage, on behalf of a user. They act as additional data security boundaries protecting users from malicious activity on the internet. Proxy servers have many different uses, depending on their configuration and type.


1 Answers

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.

like image 165
Denis Cornehl Avatar answered Nov 06 '22 21:11

Denis Cornehl