add WebSocket support for real-time delivery updates with JWT authentication and automatic reconnection
This commit is contained in:
@@ -49,6 +49,20 @@ server {
|
||||
expires 0;
|
||||
}
|
||||
|
||||
# WebSocket endpoint — long-lived connections need extended timeouts
|
||||
location = /api/ws {
|
||||
proxy_pass http://backend:8080;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_read_timeout 86400s;
|
||||
proxy_send_timeout 86400s;
|
||||
}
|
||||
|
||||
# Proxy API requests to backend
|
||||
location /api/ {
|
||||
proxy_pass http://backend:8080;
|
||||
|
||||
Reference in New Issue
Block a user