我正在使用Nginx +flask- socket - to + aws elb,当URL加载到https上时,我得到了以下错误消息,这是与Nginx和套接字相关的东西,请帮助我。
socket.io.min.js:2 Mixed Content: The page at 'https://localhost/' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://localhost/socket.io/1/?t=1477375737508'. This request has been blocked; the content must be served over HTTPS.d.handshake @ socket.io.min.js:2
socket.io.min.js:2 XMLHttpRequest cannot load http://localhost/socket.io/1/?t=1477375737508. Failed to start loading.发布于 2016-10-26 00:23:40
查看.js文件,确保使用了正确的ajax URL (//your_site.com/handler,而不是http://your_site.com/handler),例如:
$.ajax({
url:'//your_site.com/handler',dataType:'json',type:'get',
success: function(data){...},
complete:function(xhr, textStatus){...}
});https://stackoverflow.com/questions/40232580
复制相似问题