This is for routing private, admin requests to isolated Fly Apps/Machines. It will work across apps in different 6pn networks, and work more reliably for HTTP requests than using the 6pn/<app>
.internal directly.
- Clone repo
- Run
flyctl launch --flycast
- Pick the right org
Send requests to <your-app>.<router-app>.flycast
, it will reroute the request to the matching service on <your-app>
.
➜ ~ curl http://localhost:3004 -H "fly-app-name:my-app" -D - -H 'fly-machine-id: 1234'
HTTP/1.1 200 OK
Content-Type: text/plain
fly-replay: app=my-app;instance=1234
Date: Fri, 16 May 2025 17:11:33 GMT
Content-Length: 60
Replaying request to: app=my-app;instance=1234 (via headers)