How to configure Rails with Puma to use SSL?

后端 未结 5 1196
滥情空心
滥情空心 2020-12-31 05:22

I only found how to start puma using SSL:

$ puma -b \'ssl://127.0.0.1:9292?key=path_to_key&cert=path_to_cert\'

However, there is no descri

5条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-31 06:04

    Combining certificate and bundle will work only if you use nginx.

    Without nginx, you can use ca and verify_mode options:

    rails s puma -b 'ssl://0.0.0.0:9292?key=path_to_key.key&cert=path_to_cert.crt&verify_mode=none&ca=path_to_root_bundle.crt'

    Source: https://github.com/puma/puma/blob/master/lib/puma/binder.rb

提交回复
热议问题