New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docs on CORS? #285
Comments
Hey, there's not enough information here to diagnose what's going on. The error message shown doesn't mention CORS at all, what makes you think CORS is the issue here? Can you share more details on your nginx configuration, screenshots of the attempted request from the browser, e.t.c. Also, can you test this with the sample Sente app as it is a known-good application? |
Hi! Thanks for getting back to me :) After tinkering all day, I've got this ALMOST working. My Nginx config is as follows. I'm using an upstream proxy.
For just a proof of concept -- since cross domain sessions are also tricky -- I've also tried just setting the user id in a get request during the initial handshake.
The thing is that this response
Again this is just for proof of concept, I've modified the :user-id-fn to take whatever id is passed in as a GET param
As the "200" error is intermittent, I've gotten it to a place where evaluating @connected-uids actually shows something
But pushing to one of the connected ids times out
I started with the example app and everything worked fine until I ran into load balancer issue and tried to go down the CORS route. |
Any updates on this issue? Can it be closed? Thanks! |
Hello!
This is somewhat of a loaded question, but, I'm using a load balancer in production. To avoid the confusion of having clients connected to multiple different servers and having their UIDs stored in different atoms, I decided to make a single websocket server, and have the users connect to that server's websocket.
The code looks something like this:
It's unclear to me though what else I'm supposed to be doing.
I changed nginx conf on my server and I keep getting
"Error during WebSocket handshake: Unexpected response code: 200"
Do you have any guidance on using CORS? Or generally about how to work with load balanced applications (if not using CORS)
Many thanks!
The text was updated successfully, but these errors were encountered: