From 5127b9d4fca629cf29024e63528506a4227bfb3a Mon Sep 17 00:00:00 2001 From: Nate Berkopec Date: Sun, 19 Sep 2021 14:24:54 -0600 Subject: [PATCH] Update README.md --- README.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 31c3e933..46f6ccb3 100644 --- a/README.md +++ b/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): -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 ```