As the title says, Google doesn't give anything useful concerning this.
How do I set up and configure HTTPS/SSL for Sinatra apps?
How do I create a HTTPS route?
I have never used HTTPS for my apps before and have no experience tweaking Rack/whatever, so I appreciate detailed answers.
this seems to do it for me:
[hat tip to http://www.networkworld.com/columnists/2007/090507-dr-internet.html]
I think using rack-ssl is the best option.
Then you just do:
and all
http://
calls are redirected tohttps://
I guess you need to setup your Web-server, not Sinatra, to work with SSL. In Sinatra you can use the
request.secure?
method to check for the SSL usage.SSL + Nginx: the first article, the second one.
I modified code of richard_bw as to be able close or restart it with Ctrl+C: