From 1346b1bf117fa08ff6d4e9329ff504c8053898f8 Mon Sep 17 00:00:00 2001 From: Christopher Brown Date: Thu, 23 May 2019 14:15:13 -0400 Subject: [PATCH] fix extra www --- server/common.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/common.go b/server/common.go index f7d0297..6c35a07 100644 --- a/server/common.go +++ b/server/common.go @@ -23,7 +23,8 @@ func SubdomainURL(c echo.Context, subdomain string) string { scheme = "https" } locale := LocaleForRequest(c.Request()) - host := strings.TrimPrefix(c.Request().Host, locale.Subdomain+".") + host := strings.TrimPrefix(c.Request().Host, "www.") + host = strings.TrimPrefix(c.Request().Host, locale.Subdomain+".") if subdomain != "" { host = subdomain + "." + host }