diff --git a/oml/nodes.py b/oml/nodes.py index 4a8feab..2307550 100644 --- a/oml/nodes.py +++ b/oml/nodes.py @@ -193,7 +193,7 @@ class Node(Thread): version = r.headers.get('X-Node-Protocol', None) if version != settings.NODE_PROTOCOL: - logger.debug('version does not match local: %s remote %s', settings.NODE_PROTOCOL, version) + logger.debug('version does not match local: %s remote %s (%s)', settings.NODE_PROTOCOL, version, self.user_id) self.online = False if version > settings.NODE_PROTOCOL: state.update_required = True diff --git a/oml/websocket.py b/oml/websocket.py index d340506..20447d0 100644 --- a/oml/websocket.py +++ b/oml/websocket.py @@ -28,7 +28,7 @@ class Handler(WebSocketHandler): ) def open(self): - if self.request.headers['origin'] not in ('null', 'http://127.0.0.1:9842') \ + if self.request.headers['origin'] not in ('null', 'file://', 'http://127.0.0.1:9842') \ and self.request.host not in self.request.headers['origin']: logger.debug('reject cross site attempt to open websocket %s', self.request) self.close()