内容安全政策阻止wss://chat.quickblox.com:5291

时间:2016-11-10 14:31:05

标签: cordova quickblox content-security-policy

我正在尝试将我的应用部署到iOS设备,但是在wss://chat.quickblox.com上遇到连接到我的聊天终端的问题:5291

这被CSP规则阻止,因此无法连接。我已经尝试过编辑我的规则,但它只会在其他地方造成混乱。有人可以提供指导吗?

由于

<meta http-equiv="Content-Security-Policy" content="default-src * 'unsafe-eval' 'unsafe-inline' data: gap: https://<mysite>.azurewebsites.net; connect-src *; script-src * 'self' 'unsafe-inline' 'unsafe-eval'; style-src * 'self' 'unsafe-inline'; font-src * data: 'self'; img-src * data: 'self'; media-src *">

[Error] Refused to connect to wss://chat.quickblox.com:5291 because it does not appear in the connect-src directive of the Content Security Policy.
[Error] SecurityError (DOM Exception 18): The operation is insecure.
    (anonymous function) (quickblox.min.js:8:23676)
    _connect (quickblox.min.js:8:23676)
    connect (quickblox.min.js:7:28223)
    connect (quickblox.min.js:2:7321)
    connect (controllers.js:346)
    (anonymous function) (controllers.js:367)
    (anonymous function) (quickblox.min.js:2:2528)
    handleResponse (quickblox.min.js:4)
    success (quickblox.min.js:4:738)
    i (jquery.min.js:2:27071)
    fireWith (jquery.min.js:2:27830)
    z (jquery.min.js:4:11959)
    (anonymous function) (jquery.min.js:4:15509)

0 个答案:

没有答案