From b26a22de5d781af4b4afad73abb0cd237afd45b7 Mon Sep 17 00:00:00 2001 From: j Date: Tue, 12 Aug 2014 15:35:50 +0200 Subject: [PATCH] its 127.0.0.1 not localhost --- oml/websocket.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/oml/websocket.py b/oml/websocket.py index 58160f7..b4f4fe4 100644 --- a/oml/websocket.py +++ b/oml/websocket.py @@ -19,11 +19,11 @@ class Handler(WebSocketHandler): def check_origin(self, origin): # allow access to websocket from site, installer and loader (local file) return self.request.host in origin \ - or origin == 'http://localhost:9842' \ + or origin == 'http://127.0.0.1:9842' \ or origin == 'null' def open(self): - if self.request.headers['origin'] not in ('null', 'http://localhost:9842') \ + if self.request.headers['origin'] not in ('null', '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()