You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Fly.io generates Database URLs using somewhat standard sslmode params in the GET params. The URL parsing in postgres-kit doesn't take the more standard sslmode params into account as expressed in Postgres docs.
ssl or tls (whichever is first) the values require, true, false.
It seems that require does the Postgres documented require above, true is prefer, false is disable.
Describe the solution you'd like
I presume some folks are already using these ssl/tls options that are described. I'd propose a solution that accepts the more specific sslmode rules and in the absence of sslmode follows the current behavior.
Perhaps the current behavior can be deprecated at some point to follow one implementation.
We were able to get around it by altering the params by hand.
This is less ideal because Fly.io users receive this URL in their app automatically. Having to dig around that URL and write a secret by hand for this isn't great.
Is your feature request related to a problem? Please describe.
Fly.io generates Database URLs using somewhat standard
sslmode
params in the GET params. The URL parsing inpostgres-kit
doesn't take the more standardsslmode
params into account as expressed in Postgres docs.Postgres Docs specify a few options:
Where the current postgres-kit implementation accepts:
https://github.com/vapor/postgres-kit/blob/main/Sources/PostgresKit/SQLPostgresConfiguration.swift#L51C1-L54C37
ssl
ortls
(whichever is first) the valuesrequire
,true
,false
.It seems that require does the Postgres documented
require
above,true
isprefer
,false
isdisable
.Describe the solution you'd like
I presume some folks are already using these ssl/tls options that are described. I'd propose a solution that accepts the more specific
sslmode
rules and in the absence ofsslmode
follows the current behavior.Perhaps the current behavior can be deprecated at some point to follow one implementation.
I opened a branch to illustrate. Excuse the amateur Swift main...jphenow:swift-postgres-kit:jphenow/sslmode-param
Describe alternatives you've considered
We were able to get around it by altering the params by hand.
This is less ideal because Fly.io users receive this URL in their app automatically. Having to dig around that URL and write a secret by hand for this isn't great.
Additional context
https://community.fly.io/t/error-on-deploy-with-vapor-migration/14399/6
The text was updated successfully, but these errors were encountered: