From c040e0c7fc9e54d8c0a652e3f5eab7dd660701da Mon Sep 17 00:00:00 2001 From: Jeremy Hummel Date: Thu, 26 Sep 2019 20:36:19 -0700 Subject: [PATCH] pair socket to default host --- flaskr/templates/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flaskr/templates/index.html b/flaskr/templates/index.html index 7e9134f..dddc280 100644 --- a/flaskr/templates/index.html +++ b/flaskr/templates/index.html @@ -58,7 +58,7 @@ $('button#zoom_prev').click(zoom_prev); $('button#zoom_next').click(zoom_next); - const socket = io.connect('http://' + document.domain + ':' + location.port); + const socket = io.connect(); socket.on('preview', function(msg) { console.log(msg); $('img#preview').attr("src", "{{ url_for('preview_image') }}?q=" + new Date().getTime());