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 eaad8a4..9ff5cd3 100644 --- a/belote.py +++ b/belote.py @@ -418,5 +418,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 !
`); }