:authority pseudo-header is now properly forwarded to h2_backend apps

HTTP/1 apps rely on the Host header to determine the original hostname a request was sent to.

Apps that enable the h2_backend option can’t really do this, as HTTP/2 simply doesn’t have a Host header. Instead, in the HTTP/2 world, the hostname is passed down in the :authority pseudo-header.

Previously, fly-proxy didn’t forward the original :authority pseudo-header, so when we added the h2_backend option, we just continued sending the Host header. However, not all languages and frameworks allow access to it for HTTP/2 requests. For example, Go still lets you access the Host header even if it differs from :authority, while ASP .NET replaces the Host header entirely with the value from :authority.

To make sure apps written in any language or framework can see the original hostname, fly-proxy now properly forwards the original request’s :authority to h2_backend apps.

3 Likes