Welcome! Log In Create A New Profile

Advanced

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

Maxim Dounin
December 04, 2022 05:10PM
Hello!

On Sun, Dec 04, 2022 at 08:32:13PM +0000, Jeremy Cocks via nginx wrote:

> At the moment, no authz is really happening. During this testing I was
> statically setting the advice from the policy server to be 200.
> Setting this in the access phase works fine for me with no random hitches,
> so that's fixed. Thanks.

Note that in an auth module you are not expected to return or set
200 anywhere. Instead, you should return NGX_DECLINED, NGX_OK,
NGX_HTTP_FORBIDDEN, or NGX_HTTP_UNAUTHORIZED.

> For future reference, is there anything to go by which dictates what phase
> a module should be in and its impact?
> Obviously, access is quite self-explanatory and not sure how i missed it ;')

First of all, you may want to read the relevant chapter of the
development guide:

http://nginx.org/en/docs/dev/development_guide.html#http_phases

It explains what different phases are expected to do, and lists
various standard modules which work at the relevant phases.

Reading the relevant core code and corresponding standard modules
might also help.

--
Maxim Dounin
http://mdounin.ru/
_______________________________________________
nginx mailing list -- nginx@nginx.org
To unsubscribe send an email to nginx-leave@nginx.org
Subject Author Posted

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

Jeremy Cocks via nginx December 04, 2022 12:00PM

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

Jeremy Cocks via nginx December 04, 2022 12:32PM

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

Maxim Dounin December 04, 2022 02:52PM

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

Jeremy Cocks via nginx December 04, 2022 03:02PM

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

Maxim Dounin December 04, 2022 03:20PM

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

Jeremy Cocks via nginx December 04, 2022 03:34PM

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

Maxim Dounin December 04, 2022 05:10PM

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

Maxim Dounin December 04, 2022 02:50PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 220
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready