beego使用CROS容许跨域请求

首先到 https://github.com/astaxie/beego/tree/master/plugins/cors 下载cros文件 而后在main中引入cors包 在程序开始插入以下代码git beego.InsertFilter("*", beego.BeforeRouter, cors.Allow(&cors.Options{ AllowAllOrigins: true,
相关文章
相关标签/搜索