Does [http_service] not work for internal addresses?

I configured using [http_service] and tested the app from my own computer. I can connect to example.fly.dev without any port.

However, it seems that an app using the .internal address cannot connect without specifying the internal port. Why is that?
I can connect using the internat_port directly, but I would expect the port 80 and 443 to still work as that’s the configuration I made.
Am I doing something wrong?

Hi,

I don’t know how Fly’s innards work but … by using the provided, public name.fly.dev you would be using a port … either 80 or 443. It’s just you don’t need to specify that port, since http is 80, and https is 443 (by default).

For a bit more, there’s this bit of the docs:

This includes apps configured with the simplified [http_service] section, which handles only these protocols and ports by default.

I guess an .internal domain would need to specify the port, as Fly supports your app using any port and its private network would not know otherwise. Those domains are resolved within your private network and so would be behind Fly’s proxy. If I type: http://your-app-name.internal:8080 it won’t work for me.

I don’t think you are doing anything wrong. That sounds correct.

Alright, thank you.

It does feel surprising that .internal addresses behave differently with relation to [http_service] by essentially not handling ports 80/443. I would suggest adding that information to Fly Launch configuration (fly.toml) · Fly Docs. Maybe mention that it only applies to connections using public addresses, not internal ones?

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.