package routers import ( "SCRM/controllers/admin_user" "SCRM/controllers/article" "SCRM/controllers/global" "SCRM/controllers/kefu" "SCRM/controllers/login" "SCRM/controllers/marketing_tool" "SCRM/controllers/members" "SCRM/controllers/mpwechat" "SCRM/controllers/role" "SCRM/controllers/sms" "SCRM/controllers/staff" "SCRM/controllers/micro" "SCRM/controllers/register" "SCRM/controllers/site" "github.com/astaxie/beego" "github.com/astaxie/beego/context" "github.com/astaxie/beego/plugins/cors" ) func init() { beego.InsertFilter("*", beego.BeforeRouter, cors.Allow(&cors.Options{ AllowOrigins: []string{"http://jk.kuyicloud.com", "http://localhost:8090", "http://localhost:8091", "http://test1.sgjyun.com", "https://www.ucpaas.com", "http://microweb.kuyicloud.com", "http://jk.test.sgjyun.com"}, AllowMethods: []string{"GET", "POST", "PUT", "DELETE", "OPTIONS"}, AllowHeaders: []string{"Origin", "Authorization", "Access-Control-Allow-Origin", "Access-Control-Allow-Headers", "Content-Type"}, ExposeHeaders: []string{"Content-Length", "Access-Control-Allow-Origin", "Access-Control-Allow-Headers", "Content-Type"}, AllowCredentials: true, })) beego.Get("/MP_verify_JiWyx0d2U4nzjGX5.txt", func(ctx *context.Context) { ctx.Output.Body([]byte("JiWyx0d2U4nzjGX5")) }) global.RegisterRouters() admin_user.RegisterRouters() login.RegisterRouters() role.RegisterRouters() members.RegisterRouters() marketing_tool.RegisterRouters() article.RegisterRouters() mpwechat.RegisterRouters() sms.RegisterRouters() staff.RegisterRouters() kefu.RegisterRouters() site.RegisterRouters() micro.RegisterRouters() register.RegisterRouter() }