Sha256: 75df705703bd0a5ca8661a936acc507a8041c27fcee5fa4a0c0b35ddbf478cc5
Contents?: true
Size: 505 Bytes
Versions: 22
Compression:
Stored size: 505 Bytes
Contents
require 'rack/utils' module Ckeditor class Middleware 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/ params = ::Rack::Utils.parse_query(env['QUERY_STRING']) env['HTTP_COOKIE'] = [ @session_key, ::Rack::Utils.escape(params[@session_key]) ].join('=').freeze unless params[@session_key].nil? end @app.call(env) end end end
Version data entries
22 entries across 22 versions & 5 rubygems