Skip to content

Node.js SSL Error: SvelteKit SSR add self signed Cert for local dev on Windows

BernhardAuer edited this page Jun 27, 2023 · 2 revisions
  1. look for auto-created self signed cert by asp.net core for iis express: certmgr - Certificates - Current User/Personal/Certificates/localhost (choose the right one by looking at the expiration date. YOu can see which cert gets used by the backend if you go to your swagger site (e.g. https://localhost:7234/swagger/index.html -> show certs in browser)
  2. double click on cert -> Details -> Copy to File... -> choose right location -> save .cer file
  3. convert .cer to .pem with powershell: certutil -encode <path to certificate.cer> <path to output certificate.pem>
  4. set env variable for node.js, so cert gets used (node.js doesnt use windows cert store...): $env:NODE_EXTRA_CA_CERTS="path to certificate.pem"
  5. SSR should now work
Clone this wiki locally