From c00f84bd9d7c32a268c477c70b1d66f0eeeb2fd1 Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Sat, 30 Oct 2021 19:25:18 +0200 Subject: [PATCH] Fix typo in handling of redirects. --- webserver/webserver.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/webserver/webserver.go b/webserver/webserver.go index 803fb2b..60434bd 100644 --- a/webserver/webserver.go +++ b/webserver/webserver.go @@ -133,6 +133,10 @@ func redirect(w http.ResponseWriter, r *http.Request) bool { return false } + if strings.EqualFold(r.Host, conf.CanonicalHost) { + return false + } + u := url.URL{ Scheme: "https", Host: conf.CanonicalHost,