Update config.go - libpq handle env correctly, just passtrough with an "null" URLstring if url is none
This commit is contained in:
parent
ff00fc5677
commit
ddb01405df
@ -857,10 +857,7 @@ func LoadConfig(file string) (*Config, error) {
|
||||
parsedConfig.Section("postgres").MapTo(&psql)
|
||||
if server.StoreBackend == "postgres" {
|
||||
if psql.URL == "" {
|
||||
psql.URL = os.Getenv("DATABASE_URL")
|
||||
if psql.URL == "" {
|
||||
return nil, ErrPostgresUnconfigured
|
||||
}
|
||||
psql.URL = 'postgres:///?sslmode=prefer'
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user