go gin 跨域问题解决
目录介绍go gin的跨域配置目前不支持*号代码下载官网的cfunc Cors() gin.HandlerFunc { handlerFunc := cors.New(cors.Config{ AllowMethods: []string{"*"}, AllowHeaders: []string{"Authentication"}, //此处设置非默认之外的请求头(自定义请求头),否则会出现跨域问题 AllowAllOrigins: true, AllowC
原创
2021-03-12 17:14:59 ·
496 阅读 ·
0 评论