Skip to content

Socket io (Error: server error) while in production - Using ECS Fargate with Elasticache Redis #5137

Closed Answered by ankitdsgn
ankitdsgn asked this question in Q&A
Discussion options

You must be logged in to vote

Very silly mistake on my behalf. I forgot that I have nginx reverse proxy in place. So I had to add a section for socket io in my nginx default.conf file.

location /socket.io/ {
        proxy_pass http://127.0.0.1:5000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
        proxy_set_header Host $host;
        proxy_hide_header 'Access-Control-Allow-Origin';
        }

And it worked like a charm.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by ankitdsgn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants