【报错解决】vue打开界面报错Uncaught SecurityError: Failed to construct ‘WebSocket‘

问题描述:

vue运行时正常,但是打开页面后报错

Uncaught SecurityError: Failed to construct 'WebSocket': An insecure WebSocket connection may not be initiated from a page loaded over HTTPS.

【报错解决】vue打开界面报错Uncaught SecurityError: Failed to construct ‘WebSocket‘_第1张图片

 解决方案:

在项目列表中的public下的index.html里添加以下内容即可

  

【报错解决】vue打开界面报错Uncaught SecurityError: Failed to construct ‘WebSocket‘_第2张图片

你可能感兴趣的:(报错解决,chrome,前端,vue)