♻️ Refactor: Remove error handling for downstream request in CSRF middleware

pull/3390/head
JIeJaitt 2025-04-03 15:08:05 +08:00
parent 713cc981a7
commit d304c36533
1 changed files with 0 additions and 5 deletions

View File

@ -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)