Skip to content

Commit 952678d

Browse files
authored
fix extra www (#40)
1 parent 8064ba7 commit 952678d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

server/common.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ func SubdomainURL(c echo.Context, subdomain string) string {
2323
scheme = "https"
2424
}
2525
locale := LocaleForRequest(c.Request())
26-
host := strings.TrimPrefix(c.Request().Host, locale.Subdomain+".")
26+
host := strings.TrimPrefix(c.Request().Host, "www.")
27+
host = strings.TrimPrefix(c.Request().Host, locale.Subdomain+".")
2728
if subdomain != "" {
2829
host = subdomain + "." + host
2930
}

0 commit comments

Comments
 (0)