xin

Directive reference

client_max_body_size

Limits the size of a client request body.

Syntaxclient_max_body_size size;
Contextshttpserverlocation
Defaultclient_max_body_size 1m;

Behavior

A declared body over the limit is rejected with 413 without waiting for the body to arrive. Zero disables the size check.

Example

client_max_body_size 20m;

Related directives

client_body_timeout