Skip to content

Commit ac13a2a

Browse files
committed
[db] patch ability to enable SSL for database connection
1 parent c5fac3e commit ac13a2a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/common-ts/src/database/index.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ export const connectDatabase = async (options: ConnectOptions): Promise<Sequeliz
2929
username,
3030
password,
3131
database,
32-
ssl: sslEnabled,
32+
...(sslEnabled && {
33+
dialectOptions: {
34+
ssl: { require: true, rejectUnauthorized: true },
35+
},
36+
}),
3337
pool: {
3438
max: poolMax,
3539
min: poolMin,

0 commit comments

Comments
 (0)