Is there a way to block requests before they reach my Fly.io app?

Hi everyone,

I was previously using Cloudflare Security Rules to allow only specific requests to reach my Fly.io application. Unfortunately, that approach no longer works for my use case.

My goal is to stop unwanted requests before they reach my Fly.io instance, so they don’t consume application resources or appear in my application logs.

Is there any Fly.io-native solution for this? For example:

  • Filtering requests at the Fly Proxy level
  • IP allowlists/blocklists
  • Path-based filtering
  • Custom rules that can reject requests before they’re forwarded to the application
  • Any other built-in mechanism

I’m aware I could implement filtering inside my application or with a reverse proxy, but I’m specifically looking for a solution that blocks requests before they ever reach the instance.

Has anyone solved this problem, or is this something Fly.io currently doesn’t support?

Thanks!

From my knowledge, fly doesn’t support any of that.

You’ll have to create a reverse proxy and handle everything yourself unfortunately.