totemofwolf edited a comment on issue #3954:
URL: https://github.com/apache/apisix/issues/3954#issuecomment-812816389


   > I just chatted with @totemofwolf through IM, we need to add some 
configuration items to `APISIX 1.* `to support it.
   > 
   > He will post more information later.
   
   @spacewander 
   for APISIX 1.* nginx.conf should be this (to transparent proxy requests, 
include ws , wss..) (it is from the ingress' default nginx.conf)
   
   ```
   http {
       ...
       
       + # See https://www.nginx.com/blog/websocket-nginx
       + map $http_upgrade $connection_upgrade {
       +     default          upgrade;
   
       +     # See 
http://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive
       +     ''               '';
       + }
   
       ...
   }
   
   server {
               + # Allow websocket connections
               + proxy_set_header Upgrade           $http_upgrade;
               + proxy_set_header Connection        $connection_upgrade;
   
               set $upstream_host               $host;
               + # set $upstream_upgrade            '';
               + # set $upstream_connection         '';
               set $upstream_uri                '';
   
               # proxy_http_version 1.1;
               proxy_set_header   Host              $upstream_host;
               + # proxy_set_header   Upgrade           $upstream_upgrade;
               + # proxy_set_header   Connection        $upstream_connection;
   }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to