August 30, 2018 08:13PM
Hmm, I notice this from the map documentation:

> Since variables are evaluated only when they are used, the mere declaration even of a large number of “map” variables does not add any extra costs to request processing.

Here is what I suspect:

1) The limit_req directive is being processed before the auth subrequest
2) Therefore, when the limit_req is present, the mapped variables are empty since the header from the auth request is not present. But when limit_req is removed, the mapped variables are evaluated by the access_log, which happens after the auth subrequest has been made.

Can anyone kindly confirm or reject this theory?

Thanks again,
Jared
Subject Author Posted

Throttle requests with limit_req rate based on header from response to auth subrequest

jarstewa August 29, 2018 07:13PM

Re: Throttle requests with limit_req rate based on header from response to auth subrequest

Francis Daly August 30, 2018 04:10AM

Re: Throttle requests with limit_req rate based on header from response to auth subrequest

jarstewa August 30, 2018 12:53PM

Re: Throttle requests with limit_req rate based on header from response to auth subrequest

jarstewa August 30, 2018 07:47PM

Re: Throttle requests with limit_req rate based on header from response to auth subrequest

jarstewa August 30, 2018 08:13PM

Re: Throttle requests with limit_req rate based on header from response to auth subrequest

Francis Daly August 31, 2018 07:10AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 266
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