feat: update cors
This commit is contained in:
parent
571d8d7ae8
commit
107aafecea
|
|
@ -52,7 +52,11 @@ func (m *Middleware) Register() {
|
||||||
m.App.Use(cors.New(cors.Config{
|
m.App.Use(cors.New(cors.Config{
|
||||||
Next: utils.IsEnabled(m.Cfg.Middleware.Cors.Enable),
|
Next: utils.IsEnabled(m.Cfg.Middleware.Cors.Enable),
|
||||||
AllowOrigins: "*",
|
AllowOrigins: "*",
|
||||||
AllowHeaders: "Origin, Content-Type, Accept",
|
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{
|
//m.App.Use(filesystem.New(filesystem.Config{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue