Sha256: 1bfc9777ffdda3fb9572e026c1fc2e9d05bb827546e17dfacbe6c6f03a1c88d8
Contents?: true
Size: 429 Bytes
Versions: 14
Compression:
Stored size: 429 Bytes
Contents
require 'rack/utils' class FlashSessionCookieMiddleware def initialize(app, session_key = '_session_id') @app = app @session_key = session_key end def call(env) if env['HTTP_USER_AGENT'] =~ /^(Adobe|Shockwave) Flash/ req = Rack::Request.new(env) env['HTTP_COOKIE'] = "#{@session_key}=#{req.params[@session_key]}".freeze unless req.params[@session_key].nil? end @app.call(env) end end
Version data entries
14 entries across 14 versions & 1 rubygems