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?
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With