rennokki / laravel-aws-eb

Ready-to-deploy configuration to run Laravel on AWS Elastic Beanstalk.
482 stars 130 forks source link

Add client_max_body_size and client_body_buffer_size #38

Closed Ali-Shaikh closed 3 years ago

Ali-Shaikh commented 3 years ago

Syntax: client_body_buffer_size size; Default: client_body_buffer_size 8k|16k; Context: http, server, location

Sets buffer size for reading client request body. In case the request body is larger than the buffer, the whole body or only its part is written to a temporary file. By default, buffer size is equal to two memory pages. This is 8K on x86, other 32-bit platforms, and x86-64. It is usually 16K on other 64-bit platforms.

Increase client_max_body_size to control upload allowed file size 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.

rennokki commented 3 years ago

I think I wanted once to do this to fix some 413 issues, but they weren't caused by this particular parameter. Thanks for the PR tho, it's really useful as a boilerplate. 👍