summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2015-07-18 03:15:18 (GMT)
committerChristian Pointner <equinox@helsinki.at>2015-07-18 03:15:18 (GMT)
commitf69bc7a36dbbd2c3c0526f901df145ac36e1e87d (patch)
tree9eb8f0f79c0aefc84432ec351c8bf4f4de701c61
parent3679d2844af7901cc06f75867eeba1c0cd9ef237 (diff)
better websocket location, updated Readme
-rw-r--r--README2
-rw-r--r--www/js/utils.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/README b/README
index 250b41e..6346a55 100644
--- a/README
+++ b/README
@@ -85,5 +85,5 @@ add the following to the virtualhost config:
Require valid-user
</Location>
- ProxyPass "/time" "ws://localhost:3000/time"
+ ProxyPass "/ntp" "ws://localhost:3000/ntp"
~~~/snip~~~
diff --git a/www/js/utils.js b/www/js/utils.js
index ea4f42b..cc0b657 100644
--- a/www/js/utils.js
+++ b/www/js/utils.js
@@ -163,7 +163,7 @@ function Clock(draw_callback) {
}
this.start = function() {
- this.sock = new WebSocket("wss://import.helsinki.at/ntp");
+ this.sock = new WebSocket("wss://" + window.location.host + "/ntp");
this.sock.onmessage = this.ntp_update.bind(this);
this.sock.onopen = this.sock_onopen.bind(this);
this.interval_redraw = setInterval(this.redraw.bind(this), 200);