diff --git a/main.go b/main.go index 1eefb7c..f764fdd 100644 --- a/main.go +++ b/main.go @@ -9,7 +9,9 @@ import ( "github.com/gorilla/mux" "html/template" "net/http" + "path" "path/filepath" + "strings" ) func main() { @@ -63,7 +65,7 @@ func setupFrontend(r *mux.Router) { landingpage := template.Must(template.ParseFiles(filepath.Join(config.FrontendDir, "html", "landingpage.gohtml"))) r.PathPrefix("/").HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if r.URL.Path == "/" { + if strings.TrimPrefix(r.URL.Path, path.Dir(config.Prefix)) == "/" { landingpage.Execute(w, config.PageBase) } else { server.Error404(w, r)