Testing HTTPS on Sinatra Locally

I need to check how some elements on my page behave when I access it via HTTPS. I was wondering how I can test this sinatra application locally using HTTPS. I apologize if my question doesn’t even make sense, but I would like to connect to localhost through my web browser via HTTPS.

+7
source share
1 answer

Short answer: you can create a self-signed certificate for local development. Heroku has a short article on how to create a self-signed SSL certificate .

Once you have created your certificate and key, it is pretty simple with Thin:

SSL options: --ssl Enables SSL --ssl-key-file PATH Path to private key --ssl-cert-file PATH Path to certificate --ssl-verify Enables SSL certificate verification 
+7
source

All Articles