I always had a hard time understanding how to setup HTTPS locally. It seems that there are a lot of configuring to do, and you might risk your set up if it is configured incorrectly. I was hesitant to tinker with my configs, but I had this task that I am required to have it locally setup for me to continue. So, I had no choice 🤧.
I did some digging and I was able to reach this Reddit comment. It was actually as easy as spreading butter on your toast.
🏃Steps
Install mkcert. You can follow their installation guide in Github as well.
Install mkcert for any specific local address you have. In my case, 127.0.0.1 and localhost . It would then generate a cert, and a key.
mkcert -install 127.0.0.1 localhost
Lastly, run local-ssl-proxy. Make sure to reference the cert, and key from #2. Source is the port that will have the https, and target is the port that you want to convert to https.
Upon doing mkcert -install it should install the certs as trusted. It will show up in your Chrome > Privacy and Security > Security > Manage Certificates > Authorities.
It is actually not hard, and it is straight forward. Hope you'll be able to setup your own 🥹.