Re: negation in the map directive of nginx

2022-09-08 Thread teodorescu.serban
If you want to use regexes (to negate) you should use it properly, e.g. start with a "~". See more: http://nginx.org/en/docs/http/ngx_http_map_module.html That said, Francis' idea is a good one. Trying to negate things in regex is quite counterproductive. Posted at Nginx Forum: https://forum.ngin

Re: negation in the map directive of nginx

2022-09-08 Thread Francis Daly
On Thu, Sep 08, 2022 at 01:25:20PM -0400, libresco_27 wrote: Hi there, > 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. http://nginx.org/r/limit_req_zone: Requests with an empty key va

negation in the map directive of nginx

2022-09-08 Thread libresco_27
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_

Re: Change proxy_cache options depending on status code received

2022-09-08 Thread Serban Teodorescu
I should also add that currently this works really well for every distinct $request_url by: location / { … error_page 500 502 503 504 /maintenance.html; … proxy_cache_valid 500 502 503 504 3m; } location = /maintenance.html { root /etc/nginx/static; } __

Change proxy_cache options depending on status code received

2022-09-08 Thread Serban Teodorescu
Hello, I’d like to configure nginx to put up a standard maintenance page depending on the status code received from the upstream (currently for 502, 503 and 504, cached for 3 minutes). This works pretty simple and well, but I would like to ensure the maintenance page is being served directly o

Re: waiting for full request

2022-09-08 Thread Maxim Dounin
Hello! On Wed, Sep 07, 2022 at 09:01:05AM -0400, mirokub wrote: > Hello, > Is there a way to configure NGINX to send response (200 OK) only after full > body of request is delivered? > Currently the response is sent early before the request body is fully sent. > More details of my test-case: The

Running nginx-quic in a real environment

2022-09-08 Thread João Sousa Andrade via nginx
Hello everyone, My team is currently considering using nginx-quic in a production-like environment after running it and benchmarking it in our test env. Reading "The code is currently at a beta level of quality and should not be used in production." under https://github.com/VKCOM/nginx-quic was