Node built in fetch dont reject unauthorized - How to handle self-signed certificates? or Why does no

20 Replies, 1663 Views

Yeah, the node built in fetch dont reject unauthorized certs, which is *great* for testing but awful for prod.

To enforce checks, you need to pass an `https.Agent` with `rejectUnauthorized: true`.

Pro tip: Add this to your app’s startup checks—fail fast if someone forgets to set it.

Also, +1 for better docs. This is a common gotcha.



Users browsing this thread: 1 Guest(s)