Update local.yaml to set is_done_tick_dot_com to false, add things history
This commit is contained in:
parent
a6871d4200
commit
17326a16a0
6 changed files with 12 additions and 13 deletions
8
main.go
8
main.go
|
@ -109,8 +109,12 @@ func newServer(lc fx.Lifecycle, cfg *config.Config, db *gorm.DB, notifier *notif
|
|||
WriteTimeout: cfg.Server.WriteTimeout,
|
||||
}
|
||||
config := cors.DefaultConfig()
|
||||
config.AllowAllOrigins = !cfg.IsDoneTickDotCom
|
||||
config.AllowOrigins = cfg.Server.CorsAllowOrigins
|
||||
if cfg.IsDoneTickDotCom {
|
||||
config.AllowOrigins = cfg.Server.CorsAllowOrigins
|
||||
} else {
|
||||
config.AllowAllOrigins = true
|
||||
}
|
||||
|
||||
config.AllowCredentials = true
|
||||
config.AddAllowHeaders("Authorization", "secretkey")
|
||||
r.Use(cors.New(config))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue