Add cors whitelist for socket.io
This commit is contained in:
2
app.py
2
app.py
@@ -56,4 +56,4 @@ def save_request(request):
|
||||
if __name__ == '__main__':
|
||||
# Bind to PORT if defined, otherwise default to 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='*')
|
||||
|
||||
Reference in New Issue
Block a user