Socket
Book a DemoInstallSign in
Socket

rack-ssl-rails

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rack-ssl-rails

0.0.2
bundlerRubygems
Version published
Maintainers
1
Created
Source

Rack::SSL::Rails

A simple interface to Rack::SSL for Rails.

See http://github.com/josh/rack-ssl

Usage

Simply add config.force_ssl = true to your application configuration to enable the Rack::SSL middleware and force all requests over HTTPS.

Reason

This is a response to the fact that Rack::SSL (and the above config option) are included in core in Rails 3.1. Using SSL in your app is a good idea and Rails should support best practices. But now that Rails depends on this gem my app will depend on it, and load the code, even if the code goes unused.

There are use cases for not using rack-ssl, with an app that began before Rails 3.1 we already have a solution for forcing SSL in certain areas of the codebase. Besides the fact that I need more fine-grained control over this than a global middleware, I see no reason to switch. Any app that lets users use their own domains will also not be able to use this, at least not without some prior thought.

IMO this is what the Railties API is for. 'Have it your way'. The Railties API can provide the exact same interface and ease of use, but outside of core rails. This gem could be added to the default Gemfile going forward. That way Rails continues to support best practices without increasing my app's deps unnecessarily.

https://github.com/rails/rails/commit/2c0c4d754e34b13379dfc53121a970c25fab5dae#commitcomment-383401

FAQs

Package last updated on 17 May 2011

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.