Skip to main content
Bumped by Community user
edited tags
Link
Phyrik
  • 63
  • 1
  • 4
Source Link
Phyrik
  • 63
  • 1
  • 4

Is it safe to set rejectUnauthorized to false when using Heroku's Postgres database?

I am trying to put some fields in a Postgres database hosted on a Heroku app and it keeps returning this error:

Error: self signed certificate
code: 'DEPTH_ZERO_SELF_SIGNED_CERT'

I have tried adding a key, certificate, and CA bundle but to no avail

Many StackOverflow questions with the same error say to set the variable rejectUnauthorized to false when making the http server. My question is how safe is this with a Postgres database on Heroku and would it pose any threat to the security of the database?

If the information helps I am using a node.js script to send the query to the database.