Skip to content

Commit

Permalink
Backport PR jupyter-server#340: add check_origin handler to gateway W…
Browse files Browse the repository at this point in the history
…ebSocketChannelsHandler
  • Loading branch information
kevin-bates authored and meeseeksmachine committed Dec 10, 2020
1 parent 907db90 commit 6cf8cd7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions jupyter_server/gateway/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ class WebSocketChannelsHandler(WebSocketHandler, JupyterHandler):
kernel_id = None
ping_callback = None

def check_origin(self, origin=None):
return JupyterHandler.check_origin(self, origin)

def set_default_headers(self):
"""Undo the set_default_headers in IPythonHandler which doesn't make sense for websockets"""
pass
Expand Down

0 comments on commit 6cf8cd7

Please sign in to comment.