So, I’ve been a bit back and forth with configuring one of my deployments with regards to who should do TLS termination. After landing on terminating it myself, I am no longer able to send requests through the fly network. If I pass requests internally or change the external port to something else than 443, it works just fine; but now I just run into:
$ curl -k -v https://my-app.fly.dev:443
* Trying 1.2.3.4:443...
* Connected to my-app.fly.dev (1.2.3.4) port 443 (#0)
> GET / HTTP/1.1
> Host: my-app.fly.dev:443
> User-Agent: curl/7.83.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
* HTTP 1.0, assume close after body
< HTTP/1.0 400 Bad Request
<
Client sent an HTTP request to an HTTPS server
Relevant part of config:
[[services]]
internal_port = 443
protocol = "tcp"
[[services.ports]]
handlers = []
port = 443