My module is overriding the rate limiting module status for POST requests.

Jeremy Cocks jeremy at jeremy.cx
Sun Dec 4 20:00:04 UTC 2022


> Your observation is wrong.  Rate limiting as implemented in the
> limit_req module does not distinguish between different request
> methods and always works after reading the request header

Sorry, I wasn't clear there. It kicks in for POST requests without my
module ;)

> does not distinguish between different request methods and always works
after reading the request headers.

I am assuming, given the request I am testing, is on a proxy_pass which is
a content handler,  that has something to do with why rate limiting is not
working on POST and not GET here?
If I remove the location block and just have my module and rate limiting
going without a proxy_pass, it seems to be working fine for all requests.

Thanks!
J

On Sun, 4 Dec 2022 at 19:52, Maxim Dounin <mdounin at mdounin.ru> wrote:

> Hello!
>
> On Sun, Dec 04, 2022 at 05:29:29PM +0000, Jeremy Cocks via nginx wrote:
>
> > Actually analysing the log files of this, it seems the rate limiting
> module
> > never kicks in for POST requests, my module just sets the status and
> bails.
> > Assuming this is because POST actually needs to write content?
>
> Your observation is wrong.  Rate limiting as implemented in the
> limit_req module does not distinguish between different request
> methods and always works after reading the request headers.
>
> --
> Maxim Dounin
> http://mdounin.ru/
> _______________________________________________
> nginx mailing list -- nginx at nginx.org
> To unsubscribe send an email to nginx-leave at nginx.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20221204/478afde7/attachment.htm>


More information about the nginx mailing list