feat: update cors
This commit is contained in:
parent
52c630b852
commit
9b883296aa
|
|
@ -50,9 +50,13 @@ func (m *Middleware) Register() {
|
|||
}))
|
||||
|
||||
m.App.Use(cors.New(cors.Config{
|
||||
Next: utils.IsEnabled(m.Cfg.Middleware.Cors.Enable),
|
||||
AllowOrigins: "*",
|
||||
AllowHeaders: "Origin, Content-Type, Accept",
|
||||
Next: utils.IsEnabled(m.Cfg.Middleware.Cors.Enable),
|
||||
AllowOrigins: "*",
|
||||
AllowMethods: "HEAD, GET, POST, DELETE, OPTION, PATCH",
|
||||
AllowHeaders: "Origin, Content-Type, Accept, Accept-Language, Authorization, X-Requested-With, Access-Control-Request-Method, Access-Control-Request-Headers",
|
||||
ExposeHeaders: "Content-Length, Content-Type",
|
||||
AllowCredentials: false,
|
||||
MaxAge: 12,
|
||||
}))
|
||||
|
||||
//m.App.Use(filesystem.New(filesystem.Config{
|
||||
|
|
|
|||
Loading…
Reference in New Issue