作者 yangfu

fix: cors refactor

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