Sha256: f146f4599e21f35c3c852e5d314b0d098258295b70fed48bbd6cab83dacb731d
Contents?: true
Size: 424 Bytes
Versions: 2
Compression:
Stored size: 424 Bytes
Contents
module CubaApi module Rack class AllowSessionRack def initialize( app, *not_pattern ) @app = app @regexp = /^\/#{not_pattern.join( '|^\/' )}/ end def call( env ) status, headers, resp = @app.call( env ) if not( env[ 'PATH_INFO' ].match @regexp ) headers.delete( 'Set-Cookie' ) end [ status, headers, resp ] end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
cuba-api-0.6.3 | lib/cuba_api/rack/allow_session_rack.rb |
cuba-api-0.6.2 | lib/cuba_api/rack/allow_session_rack.rb |