Sha256: bde4a10f06af22557738bdeee7e0b1dbbf4ee0506c2b28e470d88b6619d3a90e
Contents?: true
Size: 546 Bytes
Versions: 11
Compression:
Stored size: 546 Bytes
Contents
# frozen_string_literal: true module Isomorfeus module Transport class RackMiddleware WS_RESPONSE = [0, {}, []] def initialize(app) @app = app end def call(env) if env['PATH_INFO'] == Isomorfeus.api_websocket_path if env['rack.upgrade?'] == :websocket # TODO get session cookie env['rack.upgrade'] = Isomorfeus::Transport::ServerSocketProcessor.new end WS_RESPONSE else @app.call(env) end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems