nginx – 混合内容:https页面加载了https但请求不安全

weixin_38051999 2019-09-12 01:05:56
我正在使用Nginx flask-socketio aws elb,当在https上加载URL时,我收到以下错误消息,这是与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.
...全文
1368 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
weixin_38066001 2019-09-12
  • 打赏
  • 举报
回复
查看.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){...} });

430

社区成员

发帖
与我相关
我的任务
社区描述
其他技术讨论专区
其他 技术论坛(原bbs)
社区管理员
  • 其他技术讨论专区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧