From d304c36533b22c244a3ded0db75a50300f6f8f53 Mon Sep 17 00:00:00 2001 From: JIeJaitt <498938874@qq.com> Date: Thu, 3 Apr 2025 15:08:05 +0800 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Refactor:=20Remove=20error?= =?UTF-8?q?=20handling=20for=20downstream=20request=20in=20CSRF=20middlewa?= =?UTF-8?q?re?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- middleware/csrf/csrf.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/middleware/csrf/csrf.go b/middleware/csrf/csrf.go index 53a8900e..aab36685 100644 --- a/middleware/csrf/csrf.go +++ b/middleware/csrf/csrf.go @@ -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)