Skip to content

Commit

Permalink
fix(auth): possible path escape
Browse files Browse the repository at this point in the history
  • Loading branch information
Darkness4 committed Jan 27, 2024
1 parent 90d5d3d commit 6e11131
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,10 @@ var app = &cli.App{
http.Error(w, err.Error(), http.StatusInternalServerError)
}
}
r.With(jwt.Deny).Get("/counter", renderFn)
r.Route("/counter", func(r chi.Router) {
r.Use(jwt.Deny)
r.Get("/", renderFn)
})
r.Get("/*", renderFn)
r.Handle("/static/*", http.FileServer(http.FS(static)))

Expand Down

0 comments on commit 6e11131

Please sign in to comment.