log remote id if versions do not match, allow file:// to access websocket

This commit is contained in:
j 2016-01-17 20:30:19 +05:30
commit 9c1c653582
2 changed files with 2 additions and 2 deletions

View file

@ -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()