Welcome! Log In Create A New Profile

Advanced

negation in the map directive of nginx

September 08, 2022 01:25PM
Hi,

I'm working on rate limiting for specific group of client ids where if the client id is equal to XYZ don't map it, thus, the zone doesn't get incremented.

For ex -
limit_req_zone $default_rate_client_id zone=globalClientRateLimit_zone:50k rate=10r/m sync;
map $client_id $default_rate_client_id {
"^(?!ZZZZZZ)$" "$1"
}

But this doesn't seem to work. Is this the correct way to negate a particular string(ZZZZZ in this example)? Please let me know.

Thanks!
Subject Author Posted

negation in the map directive of nginx

libresco_27 September 08, 2022 01:25PM

Re: negation in the map directive of nginx

Francis Daly September 08, 2022 06:56PM

Re: negation in the map directive of nginx

libresco_27 September 11, 2022 11:22AM

Re: negation in the map directive of nginx

Francis Daly September 11, 2022 06:58PM

Re: negation in the map directive of nginx

teodorescu.serban September 09, 2022 02:53AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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