I Can use signalR on local server , but I can't use it on real server , I receive proxy error .
Tools are :(nginx version 1.20 - ubuntu - .Netcore)
Error Message on console :
WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled. at WebSocket.webSocket.onclose (WebSocketTransport.ts:129) Conf file :
location /signalR { proxy_pass http://127.0.0.1:81;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /api/v1/ { proxy_pass http://127.0.0.1:81; }
location /swagger { proxy_pass http://127.0.0.1:81; }