websocket, how to not allow cross domain access?

坚强是说给别人听的谎言 提交于 2019-12-24 15:42:43

问题


Since the Origin does not work in the case of non-browser clients: non-browser clients can connect to a Websocket server with a fake origin. Non browser clients thereby can do requests that a programmer want through a program. How to stop this? I want that only my script hosted on my domain can connect to my websocket server. This page offers a “ticket”-based authentication system: https://devcenter.heroku.com/articles/websocket-security

However, it looks like it does not solve this problem because any non-browser clients from anywhere can have a ticket also.

I want that only my script hosted on my domain can connect to my websocket server.

Please tell me how to solve this. Thanks.

来源:https://stackoverflow.com/questions/29792475/websocket-how-to-not-allow-cross-domain-access

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!