-
Notifications
You must be signed in to change notification settings - Fork 0
Node.js SSL Error: SvelteKit SSR add self signed Cert for local dev on Windows
BernhardAuer edited this page Jun 27, 2023
·
2 revisions
- 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)
- double click on cert -> Details -> Copy to File... -> choose right location -> save .cer file
- convert .cer to .pem with powershell:
certutil -encode <path to certificate.cer> <path to output certificate.pem>
- 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"
- SSR should now work