1
0
Fork 0

Enable strict slash to avoid 404 when using trailing slash

This commit is contained in:
Frédéric Guillot 2020-09-13 17:48:14 -07:00
parent dd3078dc69
commit debbf5a5b0

View file

@ -23,6 +23,7 @@ func Serve(router *mux.Router, store *storage.Storage, pool *worker.Pool, feedHa
uiRouter := router.NewRoute().Subrouter()
uiRouter.Use(middleware.handleUserSession)
uiRouter.Use(middleware.handleAppSession)
uiRouter.StrictSlash(true)
// Static assets.
uiRouter.HandleFunc("/stylesheets/{name}.css", handler.showStylesheet).Name("stylesheet").Methods(http.MethodGet)