From 15e6aa06058b59a0b0df580f85becb09d613120c Mon Sep 17 00:00:00 2001 From: wucongxing8150 <815046773@qq.com> Date: Tue, 27 Feb 2024 12:03:14 +0800 Subject: [PATCH] 2 --- api/middlewares/cors.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/middlewares/cors.go b/api/middlewares/cors.go index 634c1db..6a520e2 100644 --- a/api/middlewares/cors.go +++ b/api/middlewares/cors.go @@ -17,7 +17,7 @@ func Cors() gin.HandlerFunc { c.Header("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE, UPDATE") c.Header("Access-Control-Allow-Headers", "appid,sign,Origin, X-Requested-With, Content-Type, Accept") c.Header("Access-Control-Expose-Headers", "Content-Length, Access-Control-Allow-Origin, Access-Control-Allow-Headers, Cache-Control, Content-Language, Content-Type") - c.Header("Access-Control-Allow-Credentials", "false") + c.Header("Access-Control-Allow-Credentials", "true") c.Set("content-type", "application/json") } if method == "OPTIONS" {