I have been trying to configure a .net 5 (aspnet core) service when I try to upload the service using Nginx as a reverse proxy the GET and POST requests work but the wss (WebSocket) type requests fail.
I have the following configuration in the nginx configuration file:
location / {
proxy_pass https://localhost:5001;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection keep-alive;
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
Do you have any suggestions?
You should try this:
Add this block:
and use this regular expression for the websocket which actually travels over http/https with the always-connected functionality enabled
for example: **wss://**miserver.com/ subWSUrlText /a/b/c/d.example.
This is my configuration file: