Enable secure database connections for production environments
continuous-integration/drone/push Build is passing

Update `server/db.ts` to configure SSL/TLS for PostgreSQL connections in production, resolving authentication errors related to encryption requirements.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: ceced2fc-aa46-458d-ba87-ddd4b7bb1518
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/659922a9-0087-461c-90dd-6d9a58b81d4d/ceced2fc-aa46-458d-ba87-ddd4b7bb1518/flNt5I4
This commit is contained in:
paul-nothaft
2025-10-23 18:06:25 +00:00
parent 1f8b382fd5
commit 8d22cc5873
4 changed files with 249 additions and 0 deletions
+3
View File
@@ -17,6 +17,9 @@ export function getDatabase() {
pool = new Pool({
connectionString: databaseUrl,
ssl: process.env.NODE_ENV === 'production'
? { rejectUnauthorized: false } // Allow self-signed certificates in production
: false, // No SSL in development
});
db = drizzle(pool, { schema });