]> git.cworth.org Git - lmno.games/blobdiff - empires/game.js
Use an absolute path for the events API
[lmno.games] / empires / game.js
index 896db8fe598498aac9f735db3731ede7646b461f..d3d34949cdf87fe1875893939962b600f527b11d 100644 (file)
@@ -57,7 +57,7 @@ function post_reset() {
   request.send();
 }
 
-const events = new EventSource("events");
+const events = new EventSource(window.location + "events");
 
 events.onerror = function(event) {
   if (event.target.readyState === EventSource.CLOSED) {