From 1be0177562e2d9cd9d11c0bcc20283a2bf6d2805 Mon Sep 17 00:00:00 2001 From: Jeremy Zhang Date: Sat, 19 Aug 2017 07:30:19 +0000 Subject: [PATCH] Named the socketio endpoint to gateway --- webapp/titanembeds/static/js/embed.js | 2 +- webapp/titanembeds/utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/webapp/titanembeds/static/js/embed.js b/webapp/titanembeds/static/js/embed.js index 6ac64c5..27cc1b5 100644 --- a/webapp/titanembeds/static/js/embed.js +++ b/webapp/titanembeds/static/js/embed.js @@ -251,7 +251,7 @@ } /* SocketIO Test */ - var socket = io.connect(location.protocol + '//' + document.domain + ':' + location.port + "/gateway"); + var socket = io.connect(location.protocol + '//' + document.domain + ':' + location.port + "/gateway", {path: '/gateway'}); socket.on('connect', function() { console.log("Socket.IO Connected!"); }); diff --git a/webapp/titanembeds/utils.py b/webapp/titanembeds/utils.py index 7c5f7a4..bfe4d23 100644 --- a/webapp/titanembeds/utils.py +++ b/webapp/titanembeds/utils.py @@ -90,4 +90,4 @@ def bot_alive(): return results rate_limiter = Limiter(key_func=get_client_ipaddr) # Default limit by ip address -socketio = SocketIO() \ No newline at end of file +socketio = SocketIO(path='gateway') \ No newline at end of file