1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

Update README.md

This commit is contained in:
Nate Berkopec 2021-09-19 14:24:54 -06:00
parent 95041a393c
commit 5127b9d4fc
No known key found for this signature in database
GPG key ID: 19616755F4328D71

View file

@ -189,16 +189,24 @@ $ puma -b 'ssl://127.0.0.1:9292?key=path_to_key&cert=path_to_cert'
```
#### Self-signed SSL certificates (via _localhost_ gem, for development use):
Puma supports [localhost](https://github.com/socketry/localhost) gem for self-signed certificates. This is particularly useful if you want to use Puma with SSL locally, and self-signed certificates will work for your use-case. Currently, `localhost-authority` can be used only in MRI. To use [localhost](https://github.com/socketry/localhost), you have to `require "localhost/authority"`:
Puma supports [localhost](https://github.com/socketry/localhost) gem for self-signed certificates. This is particularly useful if you want to use Puma with SSL locally, and self-signed certificates will work for your use-case. Currently, `localhost-authority` can be used only in MRI.
To use [localhost](https://github.com/socketry/localhost), you have to `require "localhost/authority"`:
```ruby
# config.ru
# Easiest way, in your Gemfile:
group(:development) do
gem 'localhost', require: 'localhost/authority'
end
# Or in your config.ru:
require './app'
require 'localhost/authority'
run Sinatra::Application
...
# Make sure you set up puma to run on an ssl socket:
$ puma -b 'ssl://localhost:9292' config.ru
```