How to properly set up a Node.js HTTPS test for secure connections? or What's the best way to run a N

18 Replies, 1574 Views

Ugh, self-signed certs are such a pain. I gave up and just used `rejectUnauthorized: false` for local testing. Not ideal, but hey, it gets the job done.

For a *proper* fix, you could try `https://localhost` instead of `https://127.0.0.1`—sometimes the cert is bound to the hostname.

Also, check out `mkcert` (https://github.com/FiloSottile/mkcert). It’s a lifesaver for local dev with HTTPS.

Messages In This Thread



Users browsing this thread: 1 Guest(s)