Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

455
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!