Skip to content

Commit

Permalink
Use Catch-All parameters when using config.CatchAll (#129)
Browse files Browse the repository at this point in the history
* Use Catch-All parameters when using config.CatchAll

The old implementation could fail to match for example
`/git/config`, but also nested paths such as `/example/here`.

See https://pkg.go.dev/github.com/fasthttp/router#readme-catch-all-parameters

* Run go fmt
  • Loading branch information
ginger51011 authored Jan 16, 2024
1 parent 96272ff commit 39e49f3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions internal/http/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,7 @@ func Serve() error {
}
} else {
log.Trace().Msg("Catch-All mode enabled...")
r.GET("/", hellPot)
r.GET("/{path}", hellPot)
r.GET("/{path:*}", hellPot)
}

srv := getSrv(r)
Expand Down

0 comments on commit 39e49f3

Please sign in to comment.