Given that self-managed HTTP/2 via handlers = [“tls”] is no longer supported, I decided to switch. Previously, I had the following setup
[[services]]
internal_port = 5202
protocol = "tcp"
auto_stop_machines = true
auto_start_machines = true
min_machines_running = 1
[[services.ports]]
handlers = ["tls"]
port = "9090"
tls_options = { alpn = ["h2"] }
I have switched this to the new setup:
[[services]]
internal_port = 5202
protocol = "tcp"
auto_stop_machines = true
auto_start_machines = true
min_machines_running = 1
[[services.ports]]
handlers = ["tls", "http"]
port = 9090
tls_options = { alpn = ["h2"] }
http_options = { h2_backend = true }
This works. But there is a differnce in the Host header. Previously, I received my.app as the Host, now it is something like 172.19.137.34.
I need to know the original Host. An additional http_service hosted on the same machine receives the correct Host header without problems. I also echoed back the HTTP headers to debug this issue and there is no additional information that could help me discern the original Host.
This was already reported in h2_backend loses incoming request host information , but I can still reproduce it.