Add cors whitelist for socket.io

This commit is contained in:
Peter Stockings
2023-01-03 13:45:26 +11:00
parent a82e350366
commit 86b2c26df2

2
app.py
View File

@@ -56,4 +56,4 @@ def save_request(request):
if __name__ == '__main__': if __name__ == '__main__':
# Bind to PORT if defined, otherwise default to 5000. # Bind to PORT if defined, otherwise default to 5000.
port = int(os.environ.get('PORT', 5000)) port = int(os.environ.get('PORT', 5000))
socketio.run(app, host='127.0.0.1', port=port) socketio.run(app, host='127.0.0.1', port=port, cors_allowed_origins='*')