Skip to content

Commit e67b899

Browse files
committed
fix (chat): applied no buffering to chat and websocket routes
1 parent 9b795ca commit e67b899

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

src/server/nginx.conf

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ server {
1212
server_name _; # Catch all domains forwarded by GCP
1313

1414
# Location block for your chat stream
15-
location /api/chat/message {
15+
location /chat/message {
1616
proxy_pass http://backend_app;
1717

1818
# Streaming-Specific Settings
@@ -44,6 +44,20 @@ server {
4444
}
4545
}
4646

47+
# ADDED: Location block for WebSocket notifications
48+
location /api/ws/notifications {
49+
proxy_pass http://backend_app;
50+
proxy_http_version 1.1;
51+
proxy_set_header Upgrade $http_upgrade;
52+
proxy_set_header Connection "Upgrade";
53+
proxy_set_header Host $host;
54+
proxy_set_header X-Real-IP $remote_addr;
55+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
56+
proxy_set_header X-Forwarded-Proto $scheme;
57+
proxy_read_timeout 86400s;
58+
proxy_send_timeout 86400s;
59+
}
60+
4761
# General location block for all other API requests
4862
location / {
4963
proxy_pass http://backend_app;

0 commit comments

Comments
 (0)