Sha256: 78f8632511617eb1af81b701e3eebd12e62b153816fc3b18ecb4876a31e301bc
Contents?: true
Size: 493 Bytes
Versions: 6
Compression:
Stored size: 493 Bytes
Contents
require 'rack/utils' class FlashSessionCookieMiddleware def initialize(app, session_key = ActionController::Base.session_options[:key]) @app = app @session_key = session_key end def call(env) if env['HTTP_USER_AGENT'] =~ /^(Adobe|Shockwave) Flash/ req = Rack::Request.new(env) unless req.params[@session_key].nil? env['HTTP_COOKIE'] = "#{@session_key}=#{req.params[@session_key].gsub(' ','%2B')}".freeze end end @app.call(env) end end
Version data entries
6 entries across 6 versions & 1 rubygems