http-server with self-signed certs and enabling support in Chrome
source link: https://www.kevinhooke.com/2021/12/19/http-server-with-self-signed-certs-and-enabling-support-in-chrome/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
http-server with self-signed certs and enabling support in Chrome
To test loading a site locally with http-server you need to generate self-signed certs:
openssl req -newkey rsa:2048 -new -nodes -x509 -days 365 -keyout key.pem -out cert.pem
Now start up http-server using the new cert:
http-server -S -C cert.pem -o .
If you attempt to browse https://localhost:8080 though, Chrome will block self-signed certs by default. To allow self-signed certs, enter in your Chrome address bar:
chrome://flags/#allow-insecure-localhost
And then enable the highlighted setting:
CategoriesKev's BlogTagschrome, http, https, ssl
Leave a Reply Cancel reply
Your email address will not be published. Required fields are marked *
Comment
Name *
Email *
Website
Save my name, email, and website in this browser for the next time I comment.
Notify me of follow-up comments by email.
Notify me of new posts by email.
This site uses Akismet to reduce spam. Learn how your comment data is processed.
Post navigation
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK