POSTGRES_SSL_ENABLED environment variable

This commit is contained in:
Gunnar Smith
2025-09-19 23:11:22 -05:00
parent b4e43c5008
commit d2dfa41acd
5 changed files with 17 additions and 6 deletions

View File

@@ -54,7 +54,9 @@ async function restore(file, refLog) {
host: postgresIp,
port: postgresPort,
database: postgresDatabase,
ssl: { rejectUnauthorized: postgresSslRejectUnauthorized },
...(process.env.POSTGRES_SSL_ENABLED === "true"
? { ssl: { rejectUnauthorized: postgresSslRejectUnauthorized } }
: {}),
});
const backupPath = file;