Skip to content

Commit

Permalink
fix(cli): handling of SSL options from the connection string (#1564)
Browse files Browse the repository at this point in the history
Co-authored-by: Benjie Gillam <[email protected]>
  • Loading branch information
maximsmol and benjie authored Dec 20, 2021
1 parent 626aeb2 commit d8401c6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/postgraphile/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,12 @@ const coerce = (o: ReturnType<typeof parsePgConnectionString>): PoolConfig => {
return {
...o,
application_name: o['application_name'] || undefined,
ssl: o.ssl != null ? !!o.ssl : undefined,
ssl:
o.ssl == null
? undefined
: (o.ssl as any).rejectUnauthorized == null
? !!o.ssl
: (o.ssl as any),
user: typeof o.user === 'string' ? o.user : undefined,
database: typeof o.database === 'string' ? o.database : undefined,
password: typeof o.password === 'string' ? o.password : undefined,
Expand Down

0 comments on commit d8401c6

Please sign in to comment.