mirror of
https://github.com/gofiber/fiber.git
synced 2025-02-21 07:12:51 +00:00
parent
8ea25a79b9
commit
ae7d2bd754
@ -129,7 +129,7 @@ func (app *App) registerMethod(method, path string, handlers ...func(*Ctx)) {
|
||||
path = "/"
|
||||
}
|
||||
// Path always start with a '/' or '*'
|
||||
if path[0] != '/' && path[0] != '*' {
|
||||
if path[0] != '/' {
|
||||
path = "/" + path
|
||||
}
|
||||
// Store original path to strip case sensitive params
|
||||
@ -148,7 +148,7 @@ func (app *App) registerMethod(method, path string, handlers ...func(*Ctx)) {
|
||||
if isUse || method == "ALL" {
|
||||
method = "*"
|
||||
}
|
||||
var isStar = path == "*" || path == "/*"
|
||||
var isStar = path == "/*"
|
||||
// Middleware containing only a `/` equals wildcard
|
||||
if isUse && path == "/" {
|
||||
isStar = true
|
||||
|
Loading…
x
Reference in New Issue
Block a user