I reviewed the colyseus and colyseus arena docs but couldn't find an answer about ping times... Does colyseus/arena calculate the ping time for clients? If so, how do I access this information so that I can display it to the client? If not, what is the most performant way to calculate the ping time? Thanks!
Posts made by bitbeam
@coco Thanks for the additional information!
Sorry, false alarm, the colyseus server was throwing a 500 internal error as the room was being created, the error response did not contain the CORS headers so that's why the browser was displaying the CORS error. Now to figure out why my room creation process is dying... :)
I tried adding the headers manually like so in the initializeExpress method of the arena-config file, but I still get the same error :(
app.use(function(req, res, next) {
res.header("Access-Control-Allow-Origin", "*");
res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
next();
});
Hello, when I run my client from the PlayCanvas.com editor I get the following CORS error:
Access to XMLHttpRequest at 'https://xxx.colyseus.dev/matchmake/create/Battle' from origin 'https://launch.playcanvas.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
I know that cors is built into Arena now, so do I need to add a rule to grant access to 'https://launch.playcanvas.com'? If yes, how do I do that?
Thanks!