WebSocket connection fails on Chrome without SSL

后端 未结 3 577
粉色の甜心
粉色の甜心 2021-01-07 22:59

I\'m setting up a WebSocket between a standard web page and a Tomcat v7.0.62 server. The connection works fine with Tomcat SSL turned on/off on Firefox, Edge and IE11. How

相关标签:
3条回答
  • 2021-01-07 23:33
    Error in connection establishment: net::ERR_PROXY_AUTH_REQUESTED_WITH_NO_CONNECTION
    

    It seems you might have a proxy with authentication in the middle, between the clients and the service. Depending on the proxy and clients configuration, it might let through SSL connections, but plain http will get filtered.

    0 讨论(0)
  • 2021-01-07 23:47

    I can not confirm your issue. You can try the Echo Test here: http://www.websocket.org/echo.html

    The website supports http and https, you can specify ws://echo.websocket.org and wss://echo.websocket.org. I have tried all combinations and they all worked for me.

    My guess is that it is a configuration issue with your server or a problem with your browser extensions.

    0 讨论(0)
  • 2021-01-07 23:50

    This is a Chrome specific behavior. Chrome doesn't allow unsecure websocket (ws) connections to localhost (only wss, so you should setup a TLS certificate for your local web/websocket server). But the same should work without any issues in Firefox and other browsers.

    Please refer the Chrome bug report on Chromium regarding this issue. This particular problem is intentional, and they have made this change to make Chrome more secure by preventing attacks against internal network devices and processes listening on localhost.

    https://bugs.chromium.org/p/chromium/issues/detail?id=378566

    0 讨论(0)
提交回复
热议问题