1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] Can not established Websocket secure connection on Firefox

Discussão em 'Python' iniciado por Stack, Setembro 8, 2025.

  1. Stack

    Stack Membro Participativo

    I am stuck with Firefox. I could not make WebSocket work on it. I use Tornado Websocket and I initialized it by code below:

    app = Application([(r'/mypath/ws', WSHandler)])
    http_server = HTTPServer(app, ssl_options={
    "certfile": "~/certs/websocket.crt",
    "keyfile": "~/certs/websocket.key"
    })
    http_server.listen("443")


    And I initialized it on Javascript side like this:

    var WS = new WebSocket("wss://websocket.localhost/mypath/ws");


    This code works fine on Chrome, meanwhile, I created the cert by myself and run the page under HTTPS. But Firefox keeps saying that:

    Firefox can't establish a connection to the server at wss://websocket.localhost/mypath/ws.


    I google it and found too many thoughts but none of'em worked for me :(

    Any help will be appreciated.

    Continue reading...

Compartilhe esta Página