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:
parent
95041a393c
commit
5127b9d4fc
1 changed files with 10 additions and 2 deletions
12
README.md
12
README.md
|
@ -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):
|
#### 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
|
```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 './app'
|
||||||
require 'localhost/authority'
|
require 'localhost/authority'
|
||||||
run Sinatra::Application
|
run Sinatra::Application
|
||||||
|
|
||||||
...
|
...
|
||||||
|
|
||||||
|
# Make sure you set up puma to run on an ssl socket:
|
||||||
$ puma -b 'ssl://localhost:9292' config.ru
|
$ puma -b 'ssl://localhost:9292' config.ru
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue