[Python] Other users cannot connect to the server on the websocket

Discussão em 'Python' iniciado por Stack, Março 23, 2025.

  1. Stack

    Stack Membro Participativo

    I have a server on AWS EC2 with port 8001 open with a websocket application. The application itself is written in Django Channels and uses a daphne server.

    The problem is that I myself can connect to the websocket server, but other users do not have such an opportunity for some reason

    The script I'm using to connect

    const socket = new WebSocket("ws://54.145.126.99:8001/ws/chat/first_user=19628&second_user=19629", ["Bearer", token]);

    socket.onopen = function () {
    console.log("✅ connected to WebSocket server");
    };


    [​IMG] local application use http://127.0.0.1:5173/, application that use frontend dev also use http://localhost:5173/ and runs on React.

    So, i don`t which info i need to provide that you can understand problem, becouse i have no idea where that error could be. If you need some information, write i provide all.

    Continue reading...

Compartilhe esta Página