Fix compatibility with Tornado 4
http://stackoverflow.com/questions/24851207/tornado-403-get-warning-when-opening-websocket
This commit is contained in:
@@ -145,6 +145,10 @@ class TokenHandler(tornado.web.RequestHandler):
|
||||
|
||||
|
||||
class DistributeHandler(tornado.websocket.WebSocketHandler):
|
||||
|
||||
def check_origin(self, origin):
|
||||
return True
|
||||
|
||||
def open(self, params):
|
||||
group, token, name = params.split('/') + [None, None]
|
||||
self.group = group or 'default'
|
||||
|
||||
Reference in New Issue
Block a user