From: Carl Worth Date: Thu, 21 May 2020 17:24:31 +0000 (-0700) Subject: Use an absolute path for the events API X-Git-Url: https://git.cworth.org/git?p=lmno.games;a=commitdiff_plain;h=4d7bbd9fca8c718cd6a10ea7f7107974a5039138 Use an absolute path for the events API Again, from a bug report where a user's browser was unable to fetch this resource. --- diff --git a/empires/game.js b/empires/game.js index 896db8f..d3d3494 100644 --- a/empires/game.js +++ b/empires/game.js @@ -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) {