|
|
|
|
@ -53,18 +53,18 @@ class ZMQStreamHandler(websocket.WebSocketHandler):
|
|
|
|
|
|
|
|
|
|
# Check to see that origin matches host directly, including ports
|
|
|
|
|
if origin != host:
|
|
|
|
|
self.log.critical("Cross Origin WebSocket Attempt.")
|
|
|
|
|
self.log.warn("Cross Origin WebSocket Attempt.")
|
|
|
|
|
raise web.HTTPError(404)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def _execute(self, transforms, *args, **kwargs):
|
|
|
|
|
def _execute(self, *args, **kwargs):
|
|
|
|
|
"""Wrap all calls to make sure origin gets checked."""
|
|
|
|
|
|
|
|
|
|
# Check to see that origin matches host directly, including ports
|
|
|
|
|
self.check_origin()
|
|
|
|
|
|
|
|
|
|
# Pass on the rest of the handling by the WebSocketHandler
|
|
|
|
|
super(ZMQStreamHandler, self)._execute(transforms, *args, **kwargs)
|
|
|
|
|
super(ZMQStreamHandler, self)._execute(*args, **kwargs)
|
|
|
|
|
|
|
|
|
|
def clear_cookie(self, *args, **kwargs):
|
|
|
|
|
"""meaningless for websockets"""
|
|
|
|
|
|