12345678910111213141516171819202122232425 |
- package routers
-
- import (
- "Kya_New/controllers/login"
- "Kya_New/controllers/manage"
- "Kya_New/controllers/patient"
- "github.com/astaxie/beego"
- "github.com/astaxie/beego/plugins/cors"
- )
-
- func init() {
- //beego.Router("/", &controllers.MainController{})
- beego.InsertFilter("*", beego.BeforeRouter, cors.Allow(&cors.Options{
- AllowOrigins: []string{"http://localhost:8090", "http://localhost:8091", "http://mt.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,
- }))
-
- login.LoginRegisterRouter()
- patient.PatientRegisterRouter()
- manage.ManageRegisterRouter()
- }
|