mirror of https://github.com/gofiber/fiber.git
♻️ Refactor: Remove error handling for downstream request in CSRF middleware
parent
713cc981a7
commit
d304c36533
|
@ -178,11 +178,6 @@ func New(config ...Config) fiber.Handler {
|
|||
|
||||
// Execute the next middleware or handler in the stack.
|
||||
err = c.Next()
|
||||
// If the next handler returned an error, return it immediately.
|
||||
// Do not proceed to update the CSRF cookie if the request failed downstream.
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Retrieve the final token from the context, if it was set.
|
||||
finalToken, ok := c.Locals(tokenKey).(string)
|
||||
|
|
Loading…
Reference in New Issue