Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

secure_routes

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

secure_routes

  • 0.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

= SecureRoutes

== Warning! Proof of concept.

Secure routes is routing-level support for ssl in your rails 3 application.

== Installation

To install simply add this to your Gemfile: gem 'secure_routes'

Then you need to enable secure routing in your environment config: config.action_dispatch.secure_routes = true

== Usage

If you want your action to force https protocol, add this to routes: match 'login' => 'sessions#new', :secure => true

Or scope :secure => true do match 'login' => 'sessions#new' end

And if you'll try to access http://host.com/login then you'll be redirected to https://host.com/login

To force http protocol, just set :secure => false. Redirection rules works here too. If protocol is unnesesary - don't set :secure option.

You can setup secure actions usage with: config.action_dispatch.secure_routes = true

in your environment. It is false by default. So you can use securing for production only.

To spec it just clone repo, then: bundle && rake spec

FAQs

Package last updated on 10 Feb 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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc