How to make Sinatra work over HTTPS/SSL?

后端 未结 5 1631
闹比i
闹比i 2020-11-30 21:40

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 ro

5条回答
  •  南笙
    南笙 (楼主)
    2020-11-30 21:53

    The easiest solution I could find after a broad search, is the solution posted by Frank here.

    Simply place the following at the top of your Sinatra classic app to force your application to use HTTPS:

    require 'rack/ssl-enforcer'
    use Rack::SslEnforcer
    

提交回复
热议问题