Skip to content

Latest commit

 

History

History
33 lines (22 loc) · 616 Bytes

README.md

File metadata and controls

33 lines (22 loc) · 616 Bytes

Build Status

Protocool

Decides whether to use TLS encryption or not on a per-environment basis in Rails. Inspired by this discussion.

Installation

gem install protocool

Usage

Syntax

# In development mode:
Protocool.https   # => 'http'

# In any other environment:
Protocool.https   # => 'https'

Examples

In your routes:

scope constraints: { protocol: Protocool.protocol } do
  # ...
end