if statement for Content-Length

agentzh agentzh at gmail.com
Tue Feb 2 04:32:17 MSK 2010


On Sat, Jan 30, 2010 at 8:47 PM, Kingsley Foreman
<kingsley at internode.com.au> wrote:
> I want to see if I can  do something like this
>
> If (Content-Length < 1024){
>        Return 403;
> }
>

Use the "client_max_body_size" directive for it:

    client_max_body_size 1k;

See http://wiki.nginx.org/NginxHttpCoreModule#client_max_body_size

Cheers,
-agentzh



More information about the nginx mailing list