From 48e1e9c246221d6724d5d67799814779236156da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Viallon-Galinier?= Date: Fri, 8 May 2020 18:59:31 +0000 Subject: [PATCH] Correct minor bugs in deployment --- app.py | 2 +- belote.py | 2 +- settings.exemple.cfg => settings.example.cfg | 0 settings.example.py | 2 ++ templates/game_join.html | 3 ++- 5 files changed, 6 insertions(+), 3 deletions(-) rename settings.exemple.cfg => settings.example.cfg (100%) diff --git a/app.py b/app.py index 7f37644..829f939 100644 --- a/app.py +++ b/app.py @@ -7,5 +7,5 @@ sys.path.insert(0,here) import settings from belote import app, socketio -socketio.run(app, debug=False, host=settings.PUBLIC_URL, port=8080) +socketio.run(app, debug=False, host=settings.LISTEN_URL, port=8080) diff --git a/belote.py b/belote.py index 1794312..46fae97 100644 --- a/belote.py +++ b/belote.py @@ -417,5 +417,5 @@ def delete_game(user=None, game=None): if __name__ == '__main__': - socketio.run(app, debug=True, host='0.0.0.0', port=8080 ) + socketio.run(app, debug=True, host='127.0.0.1', port=8080 ) diff --git a/settings.exemple.cfg b/settings.example.cfg similarity index 100% rename from settings.exemple.cfg rename to settings.example.cfg diff --git a/settings.example.py b/settings.example.py index 04cef2f..8ca6494 100644 --- a/settings.example.py +++ b/settings.example.py @@ -1,3 +1,5 @@ # The public url for preventing # Cross_origin bugs PUBLIC_URL='127.0.0.1' +# Listen url +LISTEN_URL = '127.0.0.1' diff --git a/templates/game_join.html b/templates/game_join.html index 3ea5296..a753ea8 100644 --- a/templates/game_join.html +++ b/templates/game_join.html @@ -118,11 +118,12 @@ socket.on('leave', function(data){ $('#gostart').hide(); $('#add_player').show(); {% else %} - if (username == {{ user.login }}){ + if (username == '{{ user.login }}'){ console.log("Vous avez été banni"); $('#listpart').prepend(`
+ Vous avez été banni !
`); }