带有WSS的新Websocket会出现安全错误 [英] new Websocket with WSS gives Security Error

查看:105
本文介绍了带有WSS的新Websocket会出现安全错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果您创建一个新的websocket并使用WSS作为协议并从另一个orgin访问资源,即使存在标题Access-Control-Allow-Origin:*,也会出现安全错误。


在2017年5月最后一组安全更新之后,它在Edge中工作,但在IE11中没有工作。


按钮上onclick事件的这行代码


var con = new WebSocket('wss://echo.websocket.org/');


给出错误图片。




是否有其他人遇到过这个问题?


它接近某种更新到达某些机器,但我可以找不到你的pdate因为


工作且不起作用的机器具有相同版本的IE

解决方案

您好,


查看更新版本(帮助>关于Internet Explorer)。还要检查工作和非工作机器是否具有相同的IE安全区域设置(Internet选项的"安全"选项卡,单击"将所有区域重置为默认值"


以设置要记录的IE开发人员控制台消息.... Internet选项>高级选项卡,选中"始终记录开发人员控制台消息"...保存更改....控制台现在将列出可点击的安全性和阻止的内容警告和错误。


您提供的片段 - var con = new WebSocket('wss://echo.websocket.org/');包含无效字符(')


sb.var con = new WebSocket('wss://echo.websocket.org/');在该论坛网站的控制台中执行时没有错误。


也见
https://www.html5rocks.com/en/tutorials/websockets/basics/#toc-proxyservers
如果您在代理服务器后面运行。


问候。


https://social.msdn .microsoft.com /论坛/ IE / EN-US / 8ba70824-dba2-4425-bc75-247c2c29bde1 / IE的Web开发支持移动的与堆溢出?论坛= iewebdevelopment


If you create a new websocket and use WSS as protocol and access a resource from another orgin even if header Access-Control-Allow-Origin:* exists you get an Security Error.

It works in Edge but not in IE11 after the last group of security updates in May 2017 it worked before this.

This line of code on a onclick event on a button

var con = new WebSocket(‘wss://echo.websocket.org/’);

gives the error in the see this image.

Anybody else having this problem?

It seams like some kind of update has reached some machines but I can't find what update because

machines that works and not works have the same version of IE

解决方案

Hi,

Look at the update version (Help>About Internet Explorer). Also check that the working and non-working machines have the same IE security zone settings (Security tab of Internet Options, click "Reset all zones to default"

to set up IE to record developer console messages.... Internet Options>Advanced tab, check "Always record developer console messages" ...save changes.... the console will now list clickable security and blocked content warnings and errors.

your provided snippet - var con = new WebSocket(‘wss://echo.websocket.org/’); has invalid characters (‘)

sb. var con = new WebSocket('wss://echo.websocket.org/'); which executes without errors in the console for this forum web site.

also see https://www.html5rocks.com/en/tutorials/websockets/basics/#toc-proxyservers if you are running behind a proxy.

Regards.

https://social.msdn.microsoft.com/Forums/ie/en-US/8ba70824-dba2-4425-bc75-247c2c29bde1/ie-web-development-support-moving-to-stack-overflow?forum=iewebdevelopment


这篇关于带有WSS的新Websocket会出现安全错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆