Syntax: client_max_body_size size;
Default:
client_max_body_size 1m;
Context: http, server, location
Sets the maximum allowed size of the client request body, specified in the “Content-Length” request header field. If the size in a request exceeds the configured value, the 413 (Request Entity Too Large) error is returned to the client. Please be aware that browsers cannot correctly display this error. Setting size to 0 disables checking of client request body size.
http://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size
本文详细介绍了 Nginx 中 client_max_body_size 指令的使用方法,包括设置客户端请求体的最大允许大小、默认值及上下文等。了解如何通过此配置避免错误 413 (Request Entity Too Large) 的返回。
4473

被折叠的 条评论
为什么被折叠?



