mirror of
https://github.com/tailscale/tailscale.git
synced 2026-11-09 02:53:09 -05:00
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>