Skip to content

Commit

Permalink
Merge pull request #123 from hibare/dev
Browse files Browse the repository at this point in the history
fix: Handle routes with slashes
  • Loading branch information
hibare authored Feb 19, 2023
2 parents c00183f + 0b15ea2 commit 7ef5883
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/api/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,14 @@ func Serve() {
r.Use(middleware.Logger)
r.Use(middleware.Recoverer)
r.Use(middleware.Timeout(60 * time.Second))
r.Use(middleware.StripSlashes)
r.Use(middleware.CleanPath)

r.Get("/", home)
r.Get("/ping", handlers.HealthCheck)
r.Route("/container/{container}", func(r chi.Router) {
r.Use(middlewares.TokenAuth)
r.Get("/status/", handlers.ContainerStatus)
r.Get("/status", handlers.ContainerStatus)
})

srv := &http.Server{
Expand Down

0 comments on commit 7ef5883

Please sign in to comment.