Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

185
Visualizações
Websocket upgrade response not reaching client through Nginx

I have a IOS/swift client connecting to a NodeJS/ws websocket service through a NGINX reverse proxy. All the websocket related forwarding setup is done in the NGINX configuration and websocket service is able to upgrade and setup the websocket connection from the client's upgrade request.

But on the client end, no Response is received for the original http upgrade Request.

When the websocket terminates the connection after a timeout, the client gets the Response, which is strange.

The NGINX reverse proxy is running in a container on a VM.

I have seen one other question to the exact same issue but did not find any answers. Is this a problem with the proxy running in a container?

"Nginx not passing websocket upgrade response back to client?"

Here is the snippet of my nginx proxy.

server {
listen       443 ssl;
server_name  <hidden>;
ssl          on;
ssl_certificate     /etc/certs/<hidden>.pem;
ssl_certificate_key /etc/certs/<hidden>.pem;
ssl_protocols       SSLv3 TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers         HIGH:!aNULL:!MD5;

large_client_header_buffers 8 32k;

location ~^/(?<cluster>[^/]+)/websocket {
    proxy_pass https://<hidden>
    proxy_http_version 1.1;
    set $http_upgrade "websocket";
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header FromRP      <hidden>;
    proxy_set_header X-Real-IP   $remote_addr;
    proxy_set_header X-Real-Addr $remote_addr:$remote_port;
    proxy_set_header X-External-URL   $scheme://$host$request_uri ;
    proxy_read_timeout           360;
    access_log  /var/log/nginx/websocket.access.log upstreamlog;
    error_log  /var/log/nginx/websocket.error.log info;
    proxy_buffers 8 32k;
    proxy_buffer_size 64k;
}

}

over 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda