anti-statics section, i.e. a way to say "proxy everything but this"

I’m putting together a web site that is static except for a single POST handler. I started by putting this in fly.toml:

  guest_path = "/static"
  url_prefix = "/"

That way, the home page and everything under it is served by Fly’s proxy. However, I don’t see a way to do that but still allow for the single POST handler, which should be at /update.

This seems like a simple and not uncommon use case.

Is this possible now, or do I have to run my own web server? That would be a shame considering that Fly has such a nice proxy. If it’s not possible yet, perhaps one could declare an “anti-statics” section, i.e. a list of url_prefixes that should not be served by the proxy. Even better would be something compositional, i.e. a simple declarative language for adding to and subtracting from sets of URLs to be served by proxy, e.g. url_prefix = difference("/", "/update").


This should work the way you tried it. What happens when you post to /update?

It would be interesting to send POST, DELETE, PUT requests to the backend default, too. We’ll see if we can do that when we get this feature fully shipped.

Ha! Perhaps I misdiagnosed the problem I’m having. I’m getting Failed due to unhealthy allocations. I’ll work through the troubleshooting steps.

Oops. You were right that it already works just fine. I had built up an elaborate theory to explain the problem I was having, but the real problem was that my novice efforts at producing a Dockerfile had gone awry. All is well now.

Thanks for the quick feedback. Please forgive me for the false alarm.

Wow that’s great! No worries on the false alarm, I’m glad it’s working. We’re trying really hard to help you avoid dockerfiles. :slight_smile: