Nodejs Prisma Connect Db in Sslmode 建议点击 查看原文 查看最新内容。 原文链接: https://typonotes.com/posts/2024/07/19/nodejs-prisma-connect-db-in-sslmode/ Prisma connect Heroku Database with SSL PrivateLink: https://devcenter.heroku.com/articles/heroku-postgres-via-privatelink External Access with Certs and Key 0. Pre-Test 0.1. Test the Certificate (1) Using TablePlus to test the SSL Certificates. It works. (2) Using psql command to test 1 psql "postgres://${UserName}:${DumpPass123}@{DB_HOST}:5432/{DB_Name}?sslmode=require&sslrootcert=root.crt&sslkey=postgresql.key&sslcert=postgresql.crt" 0.2. Check the Prisma Docs From the Prisma’s docs - Configuring an SSL Connection , it supports PCKS12 only. sslmode=(disable|prefer|require) sslcert=/some/path/ca.pem sslidentity=/some/path/cert.p12 sslpassword={dump_pass} : provide while generating the cert.p12 sslaccept=(strict|accept_invalid_certs) : accept_invalid_certs is required if using the self-signed certficate. 1. download the ssl key and crts download the certificates files add your ip into whitelist 2. convert crt to pem https://stackoverflow.com/questions/4691699/how-to-convert-crt-to-pem openssl x509 -in postgresql.crt -out postgresql.crt.pem -outform PEM 3. convert crt and pem……

阅读全文