Update file middleware.go
This commit is contained in:
parent
51d46da5d7
commit
59550171ab
@ -23,7 +23,7 @@ func Jwt() fiber.Handler {
|
|||||||
return c.Next()
|
return c.Next()
|
||||||
}
|
}
|
||||||
|
|
||||||
jwt, err := jwt_adapter.Decode(strings.Replace(c.Get(jwt_adapter.DefaultHeaderKey), "Bearer ", ""))
|
jwt, err := jwt_adapter.Decode(strings.ReplaceAll(c.Get(jwt_adapter.DefaultHeaderKey), "Bearer ", ""))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fiber.NewError(fiber.StatusUnauthorized, err.Error())
|
return fiber.NewError(fiber.StatusUnauthorized, err.Error())
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user