Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Restrict access to Heroku app by IP?

Tags:

heroku

Does Heroku support an inbound firewall? I'd like to restrict access to my app by IP. I have two sites that need access to it and both have static IP addresses.

like image 437
clearwater Avatar asked Jul 14 '15 17:07

clearwater


1 Answers

There isn't a configurable firewall (like AWS security groups).

You could write some simple HTTP middleware at an application level however that checks X-Forwarded-For (https://devcenter.heroku.com/articles/http-routing#heroku-headers) against a whitelist.

IP restrictions aren't a 1:1 replacement for a proper authentication system though.

like image 121
elithrar Avatar answered Oct 10 '22 01:10

elithrar