Ugh, this is why I switched to `undici` for fetch stuff. The node built in fetch dont reject unauthorized certs, and it’s way too easy to miss.
If you’re stuck with native fetch, here’s the workaround:
```javascript
const agent = new https.Agent({ rejectUnauthorized: true });
await fetch(url, { agent });
```
Also, `ssl-checker` (npm package) can help verify certs if you’re unsure.
If you’re stuck with native fetch, here’s the workaround:
```javascript
const agent = new https.Agent({ rejectUnauthorized: true });
await fetch(url, { agent });
```
Also, `ssl-checker` (npm package) can help verify certs if you’re unsure.
