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

20 Replies, 1740 Views

Wait, really? I had no idea node built in fetch dont reject unauthorized certs. That’s... not great.

For prod, you *definitely* wanna override this. The `rejectUnauthorized` flag is your friend.

If you’re lazy (like me), you could also use a library like `got`—it’s stricter by default and way better documented.

Kinda surprised this isn’t more obvious in the Node docs. Feels like a security footgun.

Messages In This Thread



Users browsing this thread: 1 Guest(s)