Fixed URL bug
This commit is contained in:
parent
00c382de7f
commit
147b79eceb
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user