Websocket connection to wss://sample-api.azurewebsites.net:8081/app/fs213123111 failed
I’ve been trying to configure Websocket connection from frontend (VUE) Azure Static Web App to backend (Laravel) in Azure Web App Service. It’s working fine locally but not in the production server.
So far I’ve installed the necessary packages in the front including echo.js.
This is my .env in the front
VITE_REVERB_APP_KEY="1fsa12561231245"
VITE_REVERB_HOST="sample-api.azurewebsites.net"
VITE_REVERB_PORT=8080
VITE_REVERB_SCHEME="https"
.env in the backend
REVERB_SERVER_PORT=8080
REVERB_APP_ID=112345
REVERB_APP_KEY=1fsa12561231245
REVERB_APP_SECRET=adz1dgaghte
REVERB_HOST="sample-api.azurewebsites.net"
REVERB_PORT=8080
REVERB_SCHEME=https
I’ve also allowed my front end domain in the CORS settings of my App Service but still having the same issue. App service runs in Linux so Websocket is on by default.
Are they any configurations to allow websocket connection in Azure? Thank you!