diff --git a/notebook/base/zmqhandlers.py b/notebook/base/zmqhandlers.py index 0c942f5bf..7c04159b3 100644 --- a/notebook/base/zmqhandlers.py +++ b/notebook/base/zmqhandlers.py @@ -133,13 +133,9 @@ class WebSocketMixin(object): if origin is None: origin = self.get_origin() - # If no header is provided, assume we can't verify origin - if origin is None: - self.log.warning("Missing Origin header, rejecting WebSocket connection.") - return False - if host is None: - self.log.warning("Missing Host header, rejecting WebSocket connection.") - return False + # If no origin or host header is provided, assume from script + if origin is None or host is None: + return True origin = origin.lower() origin_host = urlparse(origin).netloc