Re:Agar.io
by alexcroox on Thursday April 30, 2015 @06:11AM
(#9464149)
XMLHttpRequest cannot load http://m.agar.io/?_=1430388662333. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://agar.io' is therefore not allowed access. The response had HTTP status code 520.
[ Parent
| on HN ]
This is a nasty thing that's mostly the applications fault but I feel the browser could be a little more smart about it too. The issue is that CORS headers are usually set at the application level, and applications often forget to set them when catching an error.
So if for instance your page makes a CORS request and the MySql server is away. Your app framework catches the error and renders the 500 message, but it doesn't automatically set the CORS.
Now your page receives a response that just gets flat out rejected, you can't even inspect it in the network tab.
The easiest solution is probably to set the CORS headers in NGINX.
Unfortunately, nginx doesn't allow you to set custom headers for error responses by default. You need to add something like the ngx_headers_more[1] plugin for that.
Yep, I'm getting that too. I think it got a bit too popular and the servers caught on fire.
Confirmed. Got same issues.
I'm getting tons of these:
WebSocket connection to 'ws://85.159.215.123:443/' failed: Error during WebSocket handshake: net::ERR_CONNECTION_RESET
main_out.js:3 socket error
Re:Agar.io
by hasantayyar on Thursday April 30, 2015 @07:29AM
(#9464374)
Latest stable chrome on ubuntu 14.04 and I am getting same error.