posgres ssl fix

This commit is contained in:
dal 2025-08-25 00:15:09 -06:00
parent 2e24d830f0
commit 570624a112
No known key found for this signature in database
GPG Key ID: 16F4B0E1E9F61122
1 changed files with 6 additions and 1 deletions

View File

@ -49,7 +49,12 @@ export class PostgreSQLAdapter extends BaseAdapter {
}; };
// Handle SSL configuration - default to true for security // Handle SSL configuration - default to true for security
config.ssl = pgCredentials.ssl ?? true; // But allow self-signed certificates to avoid connection errors
if (pgCredentials.ssl !== false) {
config.ssl = pgCredentials.ssl === true || pgCredentials.ssl === undefined
? { rejectUnauthorized: false } // Allow self-signed certificates
: pgCredentials.ssl; // Use custom SSL config if provided
}
// Handle connection timeout // Handle connection timeout
if (pgCredentials.connection_timeout) { if (pgCredentials.connection_timeout) {