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

20 Replies, 1742 Views

lol yeah, node built in fetch dont reject unauthorized certs because Node assumes you know what you’re doing. (Spoiler: we don’t.)

For strict mode, you need to manually set `rejectUnauthorized: true` in an `https.Agent`.

If you’re paranoid (like me), run a test with a bad cert to make sure it actually fails.

Docs? Ha. Good luck.

Messages In This Thread



Users browsing this thread: 1 Guest(s)