A Code Newbie’s everyday note.
楔子是因為我要在localhost跑program時,遇到沒有開發憑證,找了很多資料終於試成功,在這邊紀錄一下.
- Install mkcert (only once)
brew install mkcert
2. Add mkcert to your local root CAs.
mkcert -install
3. Generate a certificate for your site, signed by mkcert.
mkcert localhost
4. run this command
dotnet dev-certs https --trust
5. run this command
dotnet dev-certs https --help
Then you’re done!
Reference: