Method: Puma::DSL#ssl_bind
- Defined in:
- lib/puma/dsl.rb
#ssl_bind(host, port, opts = {}) ⇒ Object
Instead of using bind and manually constructing a URI like:
bind 'ssl://127.0.0.1:9292?key=key_path&cert=cert_path'
you can use the this method.
When binding on localhost you don’t need to specify cert and key, Puma will assume you are using the localhost gem and try to load the appropriate files.
When using the options hash parameter, the reuse: value is either true, which sets reuse ‘on’ with default values, or a hash, with :size and/or :timeout keys, each with integer values.
The cert: options hash parameter can be the path to a certificate file including all intermediate certificates in PEM format.
The cert_pem: options hash parameter can be String containing the cerificate and all intermediate certificates in PEM format.
647 648 649 650 |
# File 'lib/puma/dsl.rb', line 647 def ssl_bind(host, port, opts = {}) (opts) bind self.class.ssl_bind_str(host, port, opts) end |