This route is meant for being called prior to retrieving of the request body.
It inspects the
Content-Length header and determines if the request should
be allowed to proceed. The limit can be made variable by supplying a function
limit argument returning a numeric. If the
is missing and the limit is not
Inf the response will be set to
411 - Length Required, If the header exists but exceeds the limit the
response will be set to
413 - Request Entity Too Large. Otherwise the route
TRUE and leave the response unchanged.
sizelimit_route(limit = 5 * 1024^2)
Either a numeric or a function returning a numeric when called with the request
TRUE if the request are allowed to proceed, or
FALSE if it should
Other Route constructors:
1 2 3 4 5 6
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.