I created an app with Blazor (Blazor – API – DB). It’s a personnal app that I will not sell.
I only use it once a year on a local network with Docker (Nginx).
I would like to secure it with HTTPS. How can I do that without buying a certificate? Thanks!
2
Answers
I don’t think any certificate authority will give you a certificate to a localhost domain, but you can generate a self-signed certificate and use that:
https://stackoverflow.com/a/10176685/8792473
Your browser might complain that it’s not secure since you’re not a trusted CA, but you can safely ignore that for localhost purposes.
Generate your pfx then tell Kestrel to use it.
Install CA certificates on trusted devices as described in my other answer I linked to. You shouldn’t receive any warnings or need to accept any exceptions.