From 02ba5b37931963a23be1c48377a8f9b708a9b839 Mon Sep 17 00:00:00 2001 From: Danny van Kooten Date: Mon, 10 Dec 2018 09:32:38 +0100 Subject: [PATCH] use explicit route for index.html in case browser adds it. fixes #193 --- pkg/api/routes.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/api/routes.go b/pkg/api/routes.go index 5e1fe4f7..dab47834 100644 --- a/pkg/api/routes.go +++ b/pkg/api/routes.go @@ -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)