Skip to content
Discussion options

You must be logged in to vote

Hey, for me it was url trailing slash issue.
So config looks like this:
NGINX:

location /websocket {
        proxy_pass http://localhost:8080;  
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto https;
        proxy_set_header Origin "";
    
        # Optional WebSocket timeouts
        proxy_read_timeout 86400s;  
        proxy_send_timeout 86400s;
    
    }

websocket:

@app.websocket("/websocket")
async def websock…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@YuriiMotov
Comment options

Answer selected by YuriiMotov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question or problem
5 participants