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

foolabs-rack-flash-session

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

foolabs-rack-flash-session

  • 1.0.2
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

== Install

$ gem install rack-flash-session

=== Rails

config/environment.rb

config.gem 'rack-flash-session', :lib => 'rack/flash-session' config.middleware.insert_before(ActionController::Base.session_store, 'Rack::FlashSession');

=== Middleware

add a use line to your builder

require 'rack/flash-session' Rack::Builder.new do use Rack::FlashSession run MyApp.new end

== Options

The default session key is '_session_id' but you can specify your own:

use Rack::FlashSession, 'sid'

Or in Rails you can reference the key defined to be used as session key:

config.middleware.insert_before(ActionController::Base.session_store, 'Rack::FlashSession', config.action_controller.session[:key])

Note that the session key is used for both the query parameter name and the cookie name.

You can specify multiple session keys:

use Rack::FlashSession, 'sid', 'my_other_session_key'

== Thanks to:

Rob Anderton for posting Flash uploaders, Rails, cookie based sessions and CSRF: Rack Middleware to the rescue! (http://thewebfellas.com/blog/2008/12/22/flash-uploaders-rails-cookie-based-sessions-and-csrf-rack-middleware-to-the-rescue) on which this gem is based.

FAQs

Package last updated on 27 May 2010

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