I have a nodeJS application deployed on Heroku that connects to a MongoDB Atlas cluster. The connection works fine when I whitelist all IP addresses 0.0.0.0/0
However, I want to restrict requests to those coming from my Heroku app. To do that, I have installed the Fixie addon. It "provides Heroku applications with a fixed set of static IP addresses for outbound requests".
The static IP addresses (two IP addresses) can be found at Fixie's Dashboard. You should then add them to the IP Access list in MongoDB Atlas Dashboard.
However, when I do that the Heroku app stops working (request timeout). I checked Fixie's Logs which did not show any requests. This suggests that there is something wrong with the Heroku-Fixie connection.
To double-check I tried setting up a Fixie proxy locally to check if the requests will be added to the log, which it did. This makes me suspect an issue with the Heroku-Fixie connection as I previously mentioned.
For reference, this Tutorial described how to setup Fixie in Heroku to be used with Atlas. I have actually followed the same steps mentioned by the author but I could not get it to work.