I believe the issue is that Fly doesn’t forward X-Forwarded-Host as it’s not listed in the docs: Public Network Services · Fly Docs
Even if they did I’m not sure it can be trusted as the X-Forwarded-xxx headers are open to spoofing.
Is there a reliable way to get the host or hostname for an app running on Fly?