Files
Brendan Creane ae6c916f0f ipn/ipnlocal: normalize the serve hostname before the config lookup (#22141)
Serve looked up its config with the name exactly as the client sent
it. Config keys are lowercase with no trailing dot, so a plain HTTP
request for "svelte.example.ts.net." or "Svelte.Example.TS.net" got a
404. HTTPS had the same gap for case. TLS rejects a trailing dot in
SNI but does not lowercase it, so a client that sent mixed-case SNI
failed the handshake with "no webserver configured". Browsers and curl
lowercase the hostname before connecting, which hid that path.

Lowercase the name and trim the trailing dot in both branches of
getServeHandler, and lowercase the SNI in the cert callback.

Fixes #21538
Fixes #21986

Signed-off-by: Brendan Creane <bcreane@gmail.com>
2026-11-05 08:32:05 -08:00
..