12345678910111213141516171819202122232425262728293031323334353637 |
- package routers
-
- import (
- "gdyb/controllers/hb"
- "gdyb/controllers/js"
- "gdyb/controllers/nm"
- "gdyb/controllers/sg"
- "gdyb/controllers/zh"
-
-
-
-
- "github.com/astaxie/beego"
- "github.com/astaxie/beego/plugins/cors"
- )
-
- func init() {
- beego.InsertFilter("*", beego.BeforeRouter, cors.Allow(&cors.Options{
- AllowAllOrigins: true,
-
-
- AllowMethods: []string{"GET", "POST", "PUT", "DELETE", "OPTIONS"},
- AllowHeaders: []string{"Origin", "Authorization", "Access-Control-Allow-Origin", "Access-Control-Allow-Headers", "Content-Type", "X-XSRF-TOKEN", "Permission", "Content-Security-Policy"},
- ExposeHeaders: []string{"Content-Length", "Access-Control-Allow-Origin", "Access-Control-Allow-Headers", "Content-Type"},
- AllowCredentials: true,
- }))
- sg.HisManagerApiRegistRouters()
- sg.GdybRegistRouters()
- hb.HbybRegistRouters()
-
- zh.ZHHisManagerApiRegistRouters()
- js.JSybRegistRouters()
- nm.NmybRegistRouters()
-
-
- }
|