Merge pull request #119 from itzwam/patch-1

Update config.go to Support PostgresURL as ENV Var
This commit is contained in:
Annika Hannig 2023-11-20 12:12:49 +01:00 committed by GitHub
commit 3c13d05414
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -864,7 +864,7 @@ func LoadConfig(file string) (*Config, error) {
parsedConfig.Section("postgres").MapTo(&psql)
if server.StoreBackend == "postgres" {
if psql.URL == "" {
return nil, ErrPostgresUnconfigured
psql.URL = "postgres:///?sslmode=prefer"
}
}