diff --git a/cmd/web/handlers.go b/cmd/web/handlers.go index 660bf74..78f5fb9 100644 --- a/cmd/web/handlers.go +++ b/cmd/web/handlers.go @@ -2,18 +2,10 @@ package main import ( "net/http" - "strings" ) func (app *application) home(writer http.ResponseWriter, request *http.Request) { - domain := request.Host - domainPieces := strings.Split(domain, ".") - var baseURI string - if len(domainPieces) > 1 { - baseURI = domainPieces[len(domainPieces) - 2] + domainPieces[len(domainPieces) - 1] - } else { - baseURI = domain - } + baseURI := request.Host data := templateData{ AppLinks: getAppLinks(app.tier, baseURI),