use explicit route for index.html in case browser adds it. fixes #193

This commit is contained in:
Danny van Kooten 2018-12-10 09:32:38 +01:00
parent 97b17e0284
commit 02ba5b3793
1 changed files with 1 additions and 0 deletions

View File

@ -37,6 +37,7 @@ func (api *API) Routes() *mux.Router {
box := packr.NewBox("./../../assets/build")
r.Path("/tracker.js").Handler(serveTrackerFile(&box))
r.Path("/").Handler(serveFileHandler(&box, "index.html"))
r.Path("/index.html").Handler(serveFileHandler(&box, "index.html"))
r.PathPrefix("/assets").Handler(http.StripPrefix("/assets", http.FileServer(box)))
r.NotFoundHandler = NotFoundHandler(&box)