By Shookshank
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!
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
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.