Skip to content

Commit 66ad3f4

Browse files
Enable check_origin on gateway websocket communication (#5471)
This is a port of the same change in NB2KG (PR 22). Fixes #5460 Co-authored-by: Dylan <[email protected]> Co-authored-by: Dylan <[email protected]>
1 parent 01e298f commit 66ad3f4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

notebook/gateway/handlers.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ class WebSocketChannelsHandler(WebSocketHandler, IPythonHandler):
3232
kernel_id = None
3333
ping_callback = None
3434

35+
def check_origin(self, origin=None):
36+
return IPythonHandler.check_origin(self, origin)
37+
3538
def set_default_headers(self):
3639
"""Undo the set_default_headers in IPythonHandler which doesn't make sense for websockets"""
3740
pass

0 commit comments

Comments
 (0)