Hi Community, I’m trying to deploy my Flask API project on App Platform. It was going smoothly but the IP whitelist in the code couldn’t find the connecting public IP of the client in the request headers. I’ve tried the following headers with no luck:
X-Forwarded-For
HTTP_DO_CONNECTING_IP
DO_CONNECTING_IP
These all contained a IPV6 address that must be coming from some middleware or reverse proxy. Is there a way I can see the client IP so I can apply my whitelist? Failing that, is there an alternative to secure my app from the general public?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hey @Shookshank,
I don’t think this is available out of the box, but it looks like someone else had a similar idea and posted it on the DigitalOcean Product Ideas board. The best thing to do would be to head over and add your vote, as well as leave any additional comments about what you’d like to see implemented!
In the meantime, you could restrict access by adding authentication at the application level. For example, you could use an API key or token-based system to ensure only trusted clients can connect.
One option here is also to reach out ot the DigitalOcean support team to see if they could help out in the meantime: https://do.co/support
Hope that helps!
- Bobby