I have a simple Flask chat application that I am testing out coming from a tutorial. Supposedly I just need to run it using the "python app.py" command but when I access it via http://localhost:5000 i get a continuous message of this:
I was hoping to get 200. I have Flask, Flask-SocketIO, and eventlet already installed. Any idea that can point me in the right direction? Thank you.
The current release of Flask-SocketIO has stricter requirements with regards to cross-origin requests.
adding cors_allowed_origins='https://localhost
will resolve the error.
i.e.
SocketIO(app,cors_allowed_origins="http://localhost")
or SocketIO(app,cors_allowed_origins="*")
hopefully this work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With