The tornado version used is 4.0 +
Backstage: PS d:\codehouse\tornado\websocket> python. \ws_app.pywarning:tornado.access:403 get/ws (:: 1) 1.00msWARNING: tornado.access:403 Get/ws (:: 1) 1.00ms
Front Desk: WebSocket connection to ' Ws://localhost:8080/ws ' failed:error during WebSocket handshake:unexpected response code:40 3
Modification method: The method of overriding homology checking for websocket processing classes:
Class Websockethandler (Tornado.websocket.WebSocketHandler): def check_origin (Self, origin): return True ....
This is said to be a new feature added after the Tornado 4.0 release.
This article is from the "Orangleliu Notebook" blog, reproduced please be sure to keep this source http://blog.csdn.net/orangleliu/article/details/42008423
Author Orangleliu using Attribution-NonCommercial-sharing protocol in the same way
[Tornado] Using Webscoket is always 403 error