Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

450
Vistas
cross domain websocket connections fail in chrome, works in firefox

i recently started to face this problem on chrome,where i am not able to connect to a websocket which is hosted under a different domain.

Example use case:
consider a domain that is front-ended by load balancer -> lb.com with two datacenters -> lb-dc1 and lb-dc2.The application page is hosted from lb.com but the code in this page, will create a web socket connection to lb-dc1 or lb-dc2.

This works fine on firefox/safari, but this connection is failing on chrome.

You can also see this behavior one

https://www.websocket.org/echo.html

Where the test socket connection will fail on chrome (i am using latest 91.0 version) whereas it will work on firefox.

I have an nginx proxy to pass the WSS request.. it looks something like this

    location /socket {
      proxy_pass http://<my-service>:8080/socket;
      proxy_http_version 1.1;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection "Upgrade";
      proxy_buffering off;
      proxy_ignore_client_abort off;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header Host $host;
      proxy_read_timeout 86400;
      break;
    }



over 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda