This commit is contained in:
Léo 2020-05-09 15:25:34 +02:00
commit 21368da171
5 changed files with 6 additions and 3 deletions

2
app.py
View File

@ -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)

View File

@ -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 )

View File

@ -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'

View File

@ -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(`
<div class="alert" id="alert0">
<button type="button" class="close" onclick="javascript:hidealert('alert0')">&times;</button>
Vous avez été banni !
</div>
`);
}