Skip to content

Commit

Permalink
use explicit route for index.html in case browser adds it. fixes #193
Browse files Browse the repository at this point in the history
  • Loading branch information
dannyvankooten committed Dec 10, 2018
1 parent 97b17e0 commit 02ba5b3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/api/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 02ba5b3

Please sign in to comment.