Explorar o código

Enable strict slash to avoid 404 when using trailing slash

Frédéric Guillot %!s(int64=5) %!d(string=hai) anos
pai
achega
debbf5a5b0
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      ui/ui.go

+ 1 - 0
ui/ui.go

@@ -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)