[FIXED] Error when providing certificate
I'm passing the certificate in the url, but it doesn't work.
My project tree is this:
I entered the file address in several ways, referring to the Prisma folder, but without success.
sslcert=global-bundle.pem
sslcert=./cert/global-bundle.pem
sslcert=../cert/global-bundle.pem
Can someone help me?Solution:Jump to solution
I added the file to the NestJS CLI assets configuration and decided to test the full path in the dist folder (
sslcert=/app/dist/infra/db/prisma/cert/global-bundle.pem
) and it worked.4 Replies
Note: On localhost it works normally, the problem is when it goes to the pipeline.
What db engine are you using?
@Jon Harrell I use Postgres 15 on AWS RDS.
It works on localhost, with a Docker image, but when I upload it to the AWS development environment, it shows this error:
Error opening a TLS connection: cert file not found
Hi @jonfanz!
I believe I discovered the issue: NestJs was not including the .pem file in the application build. I added a script to make this copy, but I still haven't been able to make it work.
I tried to use these two ways, but unsuccessful:
sslcert=./cert/global-bundle.pem
sslcert=../cert/global-bundle.pem
Any idea?Solution
I added the file to the NestJS CLI assets configuration and decided to test the full path in the dist folder (
sslcert=/app/dist/infra/db/prisma/cert/global-bundle.pem
) and it worked.