Some Postgres databases on Heroku need a custom TLS configuration when SSL is required. But the driver does not have a convenient factory to build a PostgresConfiguration with only DATABASE_URL and the TLSConfiguration.
Therefore, I extended the factory functions so be able to perform this:
let url = URL(string: "https://user:password@host:8080/database")!
let tlsConfiguration = TLSConfiguration.forClient(certificateVerification: .none)
try app.databases.use(.postgres(url: url, tlsConfiguration: tlsConfiguration), as: .psql)
Some Postgres databases on Heroku need a custom TLS configuration when SSL is required. But the driver does not have a convenient factory to build a
PostgresConfiguration
with onlyDATABASE_URL
and theTLSConfiguration
.Therefore, I extended the factory functions so be able to perform this:
relates to https://github.com/vapor/postgres-kit/issues/186