Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

Hi, I have an HTTP server built with Python and FastAPI. I’m receiving a lot of malicious requests trying to access paths like /.env and /.git.
Previously, when I was using AWS ECS, I was **able **to block these kinds of requests by allowing only Cloudflare’s reserved IP ranges. That way, only requests coming through my domain (which is on Cloudflare) were able to reach the server—everything else was blocked at the firewall level, and it worked perfectly.
Now I’ve moved to DigitalOcean, and I’m still using Cloudflare for my domain. I want to implement the same setup: only allow requests that come from Cloudflare IPs and reject all others. How can I properly configure this so that I’m sure all traffic goes through Cloudflare?
“Note: I’m using DigitalOcean’s App Platform, the serverless one.”
Thanks in advance!
petercorrea
Chatree Kunjai
a18c8eb1471849c38a67f0898471e8
Sanjeev Mansotra
mhmmd-ysf
Michael Sampino
Rayjunqueira
Seymen Pek
Danny Aung
colinbester
JUST JELLY
FloatingBlueGreenSquid