Class: SockJS::Transports::XHROptions

Inherits:
SessionEndpoint show all
Defined in:
lib/sockjs/transports/xhr.rb

Direct Known Subclasses

XHRSendOptions, XHRStreamingOptions

Instance Attribute Summary

Attributes inherited from Endpoint

#connection, #http_origin, #options, #remote_addr

Attributes included from Endpoint::ClassMethods

#method, #prefix

Instance Method Summary collapse

Methods inherited from SessionEndpoint

routing_prefix

Methods inherited from Endpoint

#build_error_response, #build_response, #call, #empty_string, #error_content_type, #format_frame, #handle, #handle_http_error, #handle_request, #initialize, #inspect, #response_class

Methods included from Endpoint::ClassMethods

#add_route, #add_routes, #endpoints, #register, #route_conditions, #routing_prefix

Constructor Details

This class inherits a constructor from SockJS::Endpoint

Instance Method Details

#setup_response(request, response) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/sockjs/transports/xhr.rb', line 10

def setup_response(request, response)
  response.status = 204
  response.set_allow_options_post
  response.set_cache_control
  response.set_access_control(request.origin)
  response.set_session_id(request.session_id)
end