Socket
Book a DemoInstallSign in
Socket

rack-session

Package Overview
Dependencies
Maintainers
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rack-session

2.1.1
bundlerRubygems
Version published
Maintainers
4
Created
Source

Rack::Session

Session management implementation for Rack.

Development Status

Usage

In your config.ru:

# config.ru

require 'rack/session'
use Rack::Session::Cookie,
  :domain => 'mywebsite.com',
  :path => '/',
  :expire_after => 3600*24,
  :secret => '**unique secret key**'

Usage follows the standard outlined by rack.session, i.e.:

class MyApp
  def call(env)
    session = env['rack.session']

    # Set some state:
    session[:key] = "value"
  end
end

Compatibility

rack-session code used to be part of Rack, but it was extracted in Rack v3 to this gem. The v1 release of this gem is compatible with Rack v2, and the v2 release of this gem is compatible with Rack v3+. That means you can add gem "rack-session" to your application and it will be compatible with all versions of Rack.

Contributing

We welcome contributions to this project.

  • Fork it.
  • Create your feature branch (git checkout -b my-new-feature).
  • Commit your changes (git commit -am 'Add some feature').
  • Push to the branch (git push origin my-new-feature).
  • Create new Pull Request.

FAQs

Package last updated on 06 May 2025

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.