From 6b22d0b25eb6ef2e0e1d43351dd27f5c2f8c1b00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E4=BC=9F=E4=B9=90?= Date: Fri, 24 Mar 2023 08:57:39 +0800 Subject: [PATCH] x --- example/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/example/main.go b/example/main.go index 5707641..b2f5dc6 100644 --- a/example/main.go +++ b/example/main.go @@ -34,7 +34,8 @@ func runApp(host string) { // h: handler, // } //}), - http.Middleware(cors.Cors()), + http.Middleware( + cors.Cors(cors.WithHeader("Content-Type,X-Requested-With,Access-Control-Allow-Credentials,User-Agent,Content-Length,Authorization,token"))), ) route := hs.Route("/") route.POST("/api/v1/answer/addQuestion", func(ctx http.Context) error {