作者 yangfu

fix: cors refactor

@@ -188,6 +188,7 @@ func AllowCors() func(ctx *context.Context) { @@ -188,6 +188,7 @@ func AllowCors() func(ctx *context.Context) {
188 ctx.Output.Header("Access-Control-Allow-Headers", "*") 188 ctx.Output.Header("Access-Control-Allow-Headers", "*")
189 ctx.Output.Header("Access-Control-Allow-Credentials", "true") 189 ctx.Output.Header("Access-Control-Allow-Credentials", "true")
190 ctx.Output.Header("Access-Control-Allow-Origin", "*") //origin 190 ctx.Output.Header("Access-Control-Allow-Origin", "*") //origin
  191 + ctx.Output.Header("Access-Control-Allow-Private-Network","true")
191 if ctx.Input.Method() == http.MethodOptions { 192 if ctx.Input.Method() == http.MethodOptions {
192 // options请求,返回200 193 // options请求,返回200
193 ctx.Output.SetStatus(http.StatusOK) 194 ctx.Output.SetStatus(http.StatusOK)