Skip to content

fix: add misdirected request 421 handling for http3 - #659

Merged
savme merged 2 commits into
mainfrom
fix/misdirected-request-421
Oct 19, 2026
Merged

savme merged 2 commits into
mainfrom
fix/misdirected-request-421

Conversation

@savme

@savme savme commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Envoy Gateway gives each HTTPS listener its own route configuration. A request that arrives on a connection opened for another of our hostnames therefore matches nothing and gets a 404. Browsers send such requests because managed hostnames share edge addresses and a certificate, so they may reuse one site's connection for another. Envoy Gateway guards against this only by not offering HTTP/2 where certificates overlap, which doesn't cover HTTP/3.

The extension server now adds a catch-all virtual host to every route configuration reached only through TLS or QUIC, answering 421 Misdirected Request, so the client retries on a dedicated connection. Only requests that match no site change; Envoy prefers any exact or suffix domain over *.

Setting ALPN h2 explicitly (required for modern gRPC clients) bypasses that guard, so this needs to be in place first.

Reproduce

curl --http3-only https://site-b.datumproxy.net/                                  # 200
curl --http3-only -H 'Host: site-b.datumproxy.net' https://site-a.datumproxy.net/ # 404 (today) -> 421 (after)

Test plan

  • Unit tests for which route configurations are guarded and which are left alone
  • E2E misdirected-request: 404 on main, 421 with the fix
  • After deploy on staging: open a managed hostname you've visited before in a browser, then a second one, and reload the second

Fixes #661

@savme
savme requested a review from a team as a code owner October 16, 2026 09:21
@savme savme mentioned this pull request Oct 16, 2026
3 tasks done
@savme
savme merged commit 8b5142d into main Oct 19, 2026
18 checks passed
@savme
savme deleted the fix/misdirected-request-421 branch October 19, 2026 10:42
@savme savme mentioned this pull request Oct 19, 2026
2 of 3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Browsers sometimes get a 404 from the wrong site on shared connections

2 participants