Sha256: 8d89cae4da206dd8c2eff1ae8a32ab0ddaacb16c898433fec8030130bffc9ade

Contents?: true

Size: 371 Bytes

Versions: 6

Compression:

Stored size: 371 Bytes

Contents

module CubaApi
  class NoSessionRack
    def initialize( app, *not_pattern )
      @app = app
      @reg_exp = /^\/#{not_pattern.join( ',^\/' )}/
    end
    
    def call( env )
      status, headers, resp = @app.call( env )
      if not( env[ 'PATH_INFO' ] =~ @regexp )
        headers.delete( 'Set-Cookie' )
      end
      [ status, headers, resp ]
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
cuba-api-0.6.3 lib/cuba_api/allow_session_rack.rb~
cuba-api-0.6.2 lib/cuba_api/allow_session_rack.rb~
cuba-api-0.6.1 lib/cuba_api/allow_session_rack.rb~
cuba-api-0.6.0 lib/cuba_api/allow_session_rack.rb~
cuba-api-0.5.1 lib/cuba_api/no_session_rack.rb
cuba-api-0.5.0 lib/cuba_api/no_session_rack.rb