Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is the IP address of my heroku application

So in my django application, i'm running a task that will request from an api some data in the form of json.

in order for me to get this data, i need to give the IP address of where the requests are going to come from (my heroku app)

how do i get the ip address in which my heroku application will request at

like image 682
Francis Chang Avatar asked Aug 11 '15 02:08

Francis Chang


People also ask

How do I find my Heroku app IP address?

Heroku attaches a “x-forwarded-for” header to requests, and gives you an array of IP Addresses as the value. All you need to do is read this array by splitting the raw string at “,” and then find the last item in the array. This will be the real IP address of the client.

Does Heroku have an IP address?

Heroku does not provide Static IP addresses in the Common Runtime Environment. In Heroku Private Spaces, which costs thousands of dollars a month, Static IP's are available, but they aren't load balanced, run on dedicated proxies, or highly customizable.

What IP address is?

Here's how to find the IP address on the Android phone:Go to your phone's settings. Select “About device.” Tap on “Status.” Here you can find information about your device, including the IP address.

Where does Heroku run?

All Heroku services are hosted on Amazon's EC2 cloud-computing platform.


2 Answers

Heroku does not provide a static IP by itself but you can use addons to achieve this goal. This limitation is discussed here - https://devcenter.heroku.com/articles/apex-domains

Generally sites use URL instead of IP address to authenticate requests. You can use zerigo_dns to get an static IP address for your Heroku app.

like image 61
abhishek77in Avatar answered Sep 23 '22 01:09

abhishek77in


To my knowledge you can not get an ip for a heroku application. You could create a proxy with a known ip that serves as a middleman for the application. Otherwise you might want to look at whether heroku is still the correct solution for you

like image 31
Casey Avatar answered Sep 20 '22 01:09

Casey