Skip to content

400 No WebSocket Upgrade header found #2691

Answered by Teajey
Teajey asked this question in Q&A
Discussion options

You must be logged in to vote

I found that my nginx proxy was scrapping my original Connection and Upgrade headers. So my solution for now, at least until I find a better one, is to have nginx reset the headers as close as possible to what the client originally sent:

     location / {
       proxy_pass https://api_server;

       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 $scheme;
     }
+
+    location /subscriptions {
+      proxy_pass https://api_server/subscriptions;
+
+      proxy_http_version 1.1;
+
+      proxy_set_header        Host $host:${…

Replies: 2 comments 9 replies

Comment options

You must be logged in to vote
8 replies
@fakeshadow
Comment options

@fakeshadow
Comment options

@robjtede
Comment options

@fakeshadow
Comment options

@robjtede
Comment options

Comment options

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

Answer selected by Teajey
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants