From d604455e1f7f83ea570b6e75b34aa624a0d7628a Mon Sep 17 00:00:00 2001 From: Catherine Date: Sat, 15 Nov 2025 03:12:02 +0000 Subject: [PATCH] Ignore trailing `.` in hostnames. This means that e.g. `https://site.tld.` will be treated the same as `https://site.tld`. In DNS, the trailing empty label means "root domain" and is usually ignored when present. There are some sites with links that don't work otherwise. --- src/auth.go | 1 + 1 file changed, 1 insertion(+) diff --git a/src/auth.go b/src/auth.go index 2a98167..d9e11fe 100644 --- a/src/auth.go +++ b/src/auth.go @@ -52,6 +52,7 @@ func GetHost(r *http.Request) (string, error) { return "", AuthError{http.StatusBadRequest, fmt.Sprintf("host name %q is reserved", host)} } + host = strings.TrimSuffix(host, ".") return host, nil }