Sha256: dcae91ae0ae32972db9c618e4b71d431025b637491376eea425b8ce32c850ed7
Contents?: true
Size: 538 Bytes
Versions: 17
Compression:
Stored size: 538 Bytes
Contents
require "scorpion/rack" module Shamu module Rack # Expose a {Cookies} hash to any service that wants to use session specific # storage. class CookiesMiddleware include Scorpion::Rack def initialize( app ) @app = app end def call( env ) cookies = Shamu::Rack::Cookies.new( env ) scorpion( env ).hunt_for Shamu::Rack::Cookies, return: cookies status, headers, body = @app.call( env ) [ status, cookies.apply!( headers ), body ] end end end end
Version data entries
17 entries across 17 versions & 1 rubygems