-
I'm working on an application that uses Flask-SocketIO server with Vue.js on the client side. The issue is that when the app is deployed on NGINX server (version 1.21), it always uses polling and I keep getting following requests:
However when I deploy the application locally, the websocket are used perfectly fine as the below request suggests.
Libraries used are following:
Following is my code base: Client (Vue.js)
Server (Vue.js)
NGINX Config
I have tried adding the
I'd prefer to be using actual Websockets, does anyone know why SocketIO is falling back on polling? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Did you look at the server logs? If websocket is not available the log normally indicates the reason. |
Beta Was this translation helpful? Give feedback.
-
Fix: Updated Flask-SocketIO 4.3.2 to the latest version and used vue-socket.io-extended instead of vue-socket.io |
Beta Was this translation helpful? Give feedback.
Fix: Updated Flask-SocketIO 4.3.2 to the latest version and used vue-socket.io-extended instead of vue-socket.io