diff options
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -109,7 +109,8 @@ func newServer(lc fx.Lifecycle, cfg *config.Config, db *gorm.DB, notifier *notif WriteTimeout: cfg.Server.WriteTimeout, } config := cors.DefaultConfig() - config.AllowAllOrigins = true + config.AllowAllOrigins = !cfg.IsDoneTickDotCom + config.AllowOrigins = cfg.Server.CorsAllowOrigins config.AllowCredentials = true config.AddAllowHeaders("Authorization", "secretkey") r.Use(cors.New(config)) |