mirror of
https://github.com/gofiber/fiber.git
synced 2025-07-13 23:58:29 +00:00
♻️ Refactor: Remove error handling for downstream request in CSRF middleware
This commit is contained in:
parent
713cc981a7
commit
d304c36533
@ -178,11 +178,6 @@ func New(config ...Config) fiber.Handler {
|
|||||||
|
|
||||||
// Execute the next middleware or handler in the stack.
|
// Execute the next middleware or handler in the stack.
|
||||||
err = c.Next()
|
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.
|
// Retrieve the final token from the context, if it was set.
|
||||||
finalToken, ok := c.Locals(tokenKey).(string)
|
finalToken, ok := c.Locals(tokenKey).(string)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user