我将csp添加到我的项目中。我调用外部url:http://xx.xx.xx:3002/插座.io
response.addHeader(HEADER_NAME, "default-src 'self' 'unsafe-inline' 'unsafe-eval'; */socket 'self' 'unsafe-inline' 'unsafe-eval'")
但在我的浏览器中,我得到了一个错误:
/socket.io/?EIO=3&transport=polling&t=NNrFFxf
Content security policy: The options for this page have blocked the loading of a resource
at https://xx.xx.xx.xx:3002/socket.io/?EIO=3&transport=polling&t=NNrFz_O (default-src).
Content security policy: Unable to process unknown directive '* / socket'
有什么建议吗?
暂无答案!
目前还没有任何答案,快来回答吧!