Subject: Edge proxy resets connection when Host header includes default port (e.g. “Host: example.fly.dev:80”)
App:
Region: nrb (primary_region in fly.toml)
Summary
Requests to my app over plain HTTP (port 80) are being reset by Fly’s edge
proxy whenever the Host header includes an explicit port number, even
when that port is the default port for the scheme (80 for http). Requests
with an identical body/path but a Host header with no port succeed
normally.
This is affecting a real device integration: an embedded HTTP client (a
fuel pump controller) always sends Host: <hostname>:80 and cannot be
configured to omit the port. Because of this, the device is completely
unable to reach my app, even though it can reach other HTTP servers on
the public internet (e.g. httpbin.org) without any issue on the same
network path.
Reproduction
Both requests below are identical except for the Host header.
Request A – succeeds (200 OK)
curl -v --max-time 8 http://.fly.dev/your-endpoint-path
-X POST -H “Content-Type: application/json”
-d ‘{“Protocol”:“jsonPTS”,“PtsId”:“test”,“Packets”:[{“Id”:1,“Type”:“UploadPumpTransaction”,“Data”:{“Transaction”:1,“DateTimeStart”:“2026-09-04T12:00:00”,“DateTime”:“2026-09-04T12:00:05”,“Pump”:1,“Nozzle”:1,“Volume”:1,“Amount”:214,“Price”:214,“FuelGradeName”:“Petrol”}}]}’
Result: HTTP/1.1 200 OK, normal response body returned.
Request B – fails (connection reset)
curl -v --max-time 8 http://.fly.dev/your-endpoint-path
-H “Host: .fly.dev:80”
-X POST -H “Content-Type: application/json”
-d ‘{“Protocol”:“jsonPTS”,“PtsId”:“test”,“Packets”:[{“Id”:1,“Type”:“UploadPumpTransaction”,“Data”:{“Transaction”:1,“DateTimeStart”:“2026-09-04T12:00:00”,“DateTime”:“2026-09-04T12:00:05”,“Pump”:1,“Nozzle”:1,“Volume”:1,“Amount”:214,“Price”:214,“FuelGradeName”:“Petrol”}}]}’
Result:
- Established connection to .fly.dev ( port 80)
POST /your-endpoint-path HTTP/1.1
Host: .fly.dev:80
Content-Type: application/json
Content-Length: 266
- upload completely sent off: 266 bytes
- Recv failure: Connection reset by peer
- closing connection #0
curl: (56) Recv failure: Connection reset by peer
The only difference between A and B is the explicit “:80” in the Host
header. Per RFC 7230 Section 5.4, a Host header with the default port for
the scheme should be treated as equivalent to one without it – both
should route identically.
Also tried
- Same result connecting directly to the app’s IPv4 address
() instead of the hostname – still reset when a port is
present in Host. - fly.toml has force_https = false, so this isn’t a redirect-related
issue. - fly status / fly machine list show a single healthy machine
(min_machines_running = 1, auto_stop_machines = ‘off’), so this isn’t a
cold-start or unhealthy-machine issue either.
fly.toml (relevant section)
[http_service]
internal_port = 3000
force_https = false
auto_stop_machines = ‘off’
auto_start_machines = true
min_machines_running = 1
Ask
Could you confirm whether this is expected/intentional behavior of Fly’s
edge proxy, or a bug? If intentional, is there a configuration option to
accept a Host header with an explicit default port? This is currently a
hard blocker for a client whose embedded device cannot send a Host header
without a port number.
Happy to provide a fly-request-id from a successful request, packet
captures, or any other diagnostics that would help.