Yes, currently my location configurations is like this:
location / {
proxy_set_header HOST $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_request_buffering off;
proxy_pass http://127.0.0.41:8108/;
client_max_body_size 0;
}
Client sends chunked encoding data to Proxy, then Proxy also sends chunked encoding data to server
Previously, I set didn't set proxy_request_buffering off, so Proxy sends the entire body to server with "Content-Length" in header to server. But proxy can't send all of request body to server in both situations.
location / {
proxy_set_header HOST $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_request_buffering off;
proxy_pass http://127.0.0.41:8108/;
client_max_body_size 0;
}
Client sends chunked encoding data to Proxy, then Proxy also sends chunked encoding data to server
Previously, I set didn't set proxy_request_buffering off, so Proxy sends the entire body to server with "Content-Length" in header to server. But proxy can't send all of request body to server in both situations.