mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-24 12:05:22 +08:00
Use *args, **kwargs, log.warn
This commit is contained in:
parent
104275ab73
commit
345de4e674
@ -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"""
|
||||
|
Loading…
Reference in New Issue
Block a user