Netlify dev no longer working over SSL with self signed certificate

Our site requires SSL. After updating Netlify CLI to latest version, I am receiving Deno errors rejecting all requests because of an invalid certificate from untrusted signer. The certificate is self signed. Originally, to get it to work we had to add the [DENO_TLS_CA_STORE env variable] (3 ways of accepting self-signed certificates in Deno | Deno World) to dev environments, which forced Deno to use the system’s certificates instead of using its own store; we had our development CA cert installed on the machine. But this doesn’t seem to be working anymore. TLS was working fine until the update.

We ended up rolling back the CLI update, which is obviously a problem since we’re now out of sync with the latest Netlify production environment and experiencing conflicting behavior between dev and production. Running our site over HTTP on dev is simply not possible - we use oAuth and other services that require SSL. We can’t use a certificate from a trusted root CA either without having to run all development on something else than localhost, which is far from ideal.

We’ve also tried adding the Deno –-unsafely-ignore-certificate-errors param to the dev command but it gets rejected by Netlify.

Appreciate any help you can provide.

[FIXED] Looks like there was a change in edge function bundling on August 10, which only injected environment variables provided in the UI and ignored all variables injected via .env local environment file. Adding DENO_TLS_CA_STORE=“mozilla,system” in Netlify site env variables to include all Deno and system trusted CAs did the trick.

1 Like

Thanks for following up and sharing your solution here! it will help future forums members who encounter the same situation.
Happy building :rocket:

1 Like