Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js Heroku应用程序中Safari上阻止的socket.io CORS请求_Node.js_Heroku_Safari_Socket.io_Cors - Fatal编程技术网

Node.js Heroku应用程序中Safari上阻止的socket.io CORS请求

Node.js Heroku应用程序中Safari上阻止的socket.io CORS请求,node.js,heroku,safari,socket.io,cors,Node.js,Heroku,Safari,Socket.io,Cors,我有一个React client+Express服务器,虽然该应用程序在Chrome和本地两种浏览器中都运行良好,但当部署到Heroku时,我在Safari中得到了以下信息: [Warning] [blocked] The page at https://xxxxx.herokuapp.com/ was not allowed to display insecure content from http://localhost:5000/socket.io/?EIO=3&transport

我有一个React client+Express服务器,虽然该应用程序在Chrome和本地两种浏览器中都运行良好,但当部署到Heroku时,我在Safari中得到了以下信息:

[Warning] [blocked] The page at https://xxxxx.herokuapp.com/ was not allowed to display insecure content from http://localhost:5000/socket.io/?EIO=3&transport=polling&t=MLjfAYA.

XMLHttpRequest cannot load http://localhost:5000/socket.io/?EIO=3&transport=polling&t=MLjfTDz. Not allowed to request resource
我尝试在服务器
io.origins(['https://xxxxx.herokuapp.com“])
但这没用

客户端连接到localhost
const socket=io('http://localhost:5000)
我尝试将其更改为Heroku URL,但没有任何帮助。我在package.json中使用代理:

"proxy": "http://localhost:5000",