李伟乐 2 years ago
parent 08652aed7c
commit 6b22d0b25e
  1. 3
      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 {

Loading…
Cancel
Save