We have Heroku app on http://random-heroku-app.herokuapp.com
and access to it(using HTTPS) must be limited to just 2 IPs. Nginx with it's allow function is perfect here.
But is it possible to deploy Nginx in AWS and configure it so that it would be "in front" of Heroku app?
Example:
If I go to http://random-heroku-app.herokuapp.com
, Nginx firstly is going to check if I am trying to connect from allowed IP and only then, proxy me to http://random-heroku-app.herokuapp.com
.
Thank you in advance!