limit_req_zone Documentation Wrong
yar at nginx.com
Thu Feb 20 16:05:15 UTC 2020
> On 24 Jan 2020, at 22:17, Aidan Carson <aidan.kodi at gmail.com> wrote:
> I believe the documentation for the limit_req_zone directive on this page is wrong:
> It says that a rate parameter is not optional, but it is. The directive requires at least three parameters, but
> limit_req_zone $binary_remote_addr zone=limit:64k sync;
> limit_req_zone $binary_remote_addr zone=limit:64k zone=limit:64k;
> are valid, omitting the rate. I see in the code that the default is 1r/s. Perhaps updating the documentation to list the default would be good, or changing the code to have the rate be required.
> Thank you,
> Aidan Carson
Thank you for your feedback on the docs. The “rate” parameter is assumed to be obligatory, though the syntax (http://nginx.org/r/limit_req_zone) may be constructed in a way to make it optional. For a common use case, the current behaviour is considered correct here, so the documentation would also be correct. I wouldn’t expect much changes here but let’s leave the latter to developers.
More information about the nginx-devel