allow osx installer to connect to websocket
This commit is contained in:
parent
a85023d560
commit
00f395e304
1 changed files with 6 additions and 1 deletions
|
@ -19,7 +19,12 @@ class Handler(WebSocketHandler):
|
||||||
def check_origin(self, origin):
|
def check_origin(self, origin):
|
||||||
# allow access to websocket from site, installer and loader (local file)
|
# allow access to websocket from site, installer and loader (local file)
|
||||||
return self.request.host in origin or \
|
return self.request.host in origin or \
|
||||||
origin in ('http://127.0.0.1:9842', 'null', 'file:///')
|
origin in (
|
||||||
|
'http://127.0.0.1:9841',
|
||||||
|
'http://127.0.0.1:9842',
|
||||||
|
'file:///',
|
||||||
|
'null'
|
||||||
|
)
|
||||||
|
|
||||||
def open(self):
|
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', 'http://127.0.0.1:9842') \
|
||||||
|
|
Loading…
Reference in a new issue