From 7565212b5c132c8ebfd82ba02487f9bbb3a0aa84 Mon Sep 17 00:00:00 2001 From: wucongxing <815046773@qq.com> Date: Mon, 4 Sep 2023 15:25:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B7=AF=E7=94=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/middlewares/cors.go | 2 +- config.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/middlewares/cors.go b/api/middlewares/cors.go index 9ee0ab4..01feb6f 100644 --- a/api/middlewares/cors.go +++ b/api/middlewares/cors.go @@ -15,7 +15,7 @@ func Cors() gin.HandlerFunc { if origin != "" { c.Header("Access-Control-Allow-Origin", origin) c.Header("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE, UPDATE") - c.Header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept, Authorization") + c.Header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept, app_id,sign") 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.Set("content-type", "application/json") diff --git a/config.yaml b/config.yaml index 45286be..c76bf49 100644 --- a/config.yaml +++ b/config.yaml @@ -1,4 +1,4 @@ -port: 8300 # 启动端口 +port: 8298 # 启动端口 env: dev # 环境配置