1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

fix: enable strict slash mode for api router

This commit is contained in:
Ferdinand Mütsch 2021-03-09 23:56:38 +01:00
parent 2846748b26
commit 9de2c20885

View File

@ -165,7 +165,7 @@ func main() {
// Setup Routers // Setup Routers
router := mux.NewRouter() router := mux.NewRouter()
rootRouter := router.PathPrefix("/").Subrouter() rootRouter := router.PathPrefix("/").Subrouter()
apiRouter := router.PathPrefix("/api").Subrouter() apiRouter := router.PathPrefix("/api").Subrouter().StrictSlash(true)
// Globally used middlewares // Globally used middlewares
recoveryMiddleware := handlers.RecoveryHandler() recoveryMiddleware := handlers.RecoveryHandler()