Skip to content

Commit 96511f1

Browse files
committed
docs: update nginx config with POST body fix
1 parent 5aa49ee commit 96511f1

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed

docs/nginx-setup-complete.md

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,34 @@ server {
5959
server {
6060
server_name api.dev.codeframeapp.com;
6161
62+
# Regular API endpoints
6263
location / {
6364
proxy_pass http://127.0.0.1:14200;
64-
# Standard proxy headers configured
65+
proxy_http_version 1.1;
66+
proxy_set_header Host $host;
67+
proxy_set_header X-Real-IP $remote_addr;
68+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
69+
proxy_set_header X-Forwarded-Proto $scheme;
70+
71+
# Important for POST/PUT requests with body
72+
proxy_set_header Content-Length $content_length;
73+
proxy_set_header Content-Type $content_type;
74+
75+
# Buffering settings
76+
proxy_buffering off;
77+
proxy_request_buffering off;
6578
}
6679
80+
# WebSocket support
6781
location /ws {
6882
proxy_pass http://127.0.0.1:14200;
69-
# WebSocket headers configured
70-
# 7-day timeout for persistent connections
83+
proxy_http_version 1.1;
84+
proxy_set_header Upgrade $http_upgrade;
85+
proxy_set_header Connection "Upgrade";
86+
proxy_set_header Host $host;
87+
proxy_read_timeout 7d;
88+
proxy_connect_timeout 7d;
89+
proxy_send_timeout 7d;
7190
}
7291
7392
listen 443 ssl; # managed by Certbot

0 commit comments

Comments
 (0)