fix random subdomain redirects caused by wildcard domain
Alan Pearce alan@alanpearce.eu
Fri, 06 Dec 2024 20:41:06 +0100
1 files changed, 1 insertions(+), 1 deletions(-)
jump to
M internal/server/server.go → internal/server/server.go
@@ -200,7 +200,7 @@ config.BaseURL.JoinPath(path).String(), http.StatusMovedPermanently, ) case re.MatchString(r.Host): - url := config.BaseURL + url := config.BaseURL.JoinPath() url.Host = re.ReplaceAllString(r.Host, replace) http.Redirect(w, r, url.String(), http.StatusTemporaryRedirect) case true: