Disable max_body_size #1210
-
Hello! Is there a way to disable Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
It's not currently. But seems trivial to do so.. diff --git a/src/nxt_http_request.c b/src/nxt_http_request.c
index 425a4607..abf00c86 100644
--- a/src/nxt_http_request.c
+++ b/src/nxt_http_request.c
@@ -230,7 +230,7 @@ nxt_http_request_content_length(void *ctx, nxt_http_field_t *field,
max_body_size = r->conf->socket_conf->max_body_size;
- if (nxt_slow_path(n > max_body_size)) {
+ if (nxt_slow_path(max_body_size != -1 && n > max_body_size)) {
return NXT_HTTP_PAYLOAD_TOO_LARGE;
}
That will let you set "settings": {
"http": {
"max_body_size": -1
}
}, Quick test shows it to work... |
Beta Was this translation helpful? Give feedback.
-
I have one more question, is there a way to pass the body direct to the php app, to avoid nginx-unit to read the body of the request? |
Beta Was this translation helpful? Give feedback.
It's not currently. But seems trivial to do so..
That will let you set
Quick test shows it to work...