fix: allowed origins aren't passed to rest.NewRouter
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Dawid Wysokiński 2022-11-20 11:01:01 +01:00
parent 91fa9c6207
commit 1da68f2ad1
Signed by: Kichiyaki
GPG Key ID: B5445E357FB8B892

View File

@ -137,7 +137,7 @@ func newServer(cfg serverConfig) (*http.Server, error) {
EnnoblementService: ennoblementSvc,
CORS: rest.CORSConfig{
Enabled: apiCfg.CORSEnabled,
AllowedOrigins: nil,
AllowedOrigins: apiCfg.CORSAllowedOrigins,
AllowedMethods: apiCfg.CORSAllowedMethods,
AllowCredentials: apiCfg.CORSAllowCredentials,
MaxAge: int(apiCfg.CORSMaxAge),