How to delay requests from once unauthorized IP address

Andrei lagged at gmail.com
Tue Nov 8 16:07:43 UTC 2016


This can be done using ngx_http_limit_req_module -
http://nginx.org/en/docs/http/ngx_http_limit_req_module.html

On Tue, Oct 25, 2016 at 4:01 PM, hide <nginx-forum at forum.nginx.org> wrote:

> Hello!
>
> My Nginx does fastcgi_pass to some CGI application. The CGI application can
> return HTTP status code 401. I want Nginx to return this status code to the
> user and prevent the next access of the user to the CGI application for 5
> seconds.
>
> For example, the user accessed the CGI application through Nginx and got
> HTTP status code 401 at 17:40:40. Suppose that the IP address of the user
> is
> trying to access the CGI application through Nginx for the second time at
> 17:40:42. I want Nginx to provide that this second request will not reach
> the CGI application. Then the IP address of the user is trying to access
> the
> CGI application through Nginx for the third time at 17:40:46. I want Nginx
> to let this third request go to the CGI application because 5 seconds have
> already passed. Suppose that this third request has worked successfully
> with
> HTTP status code 200. Then the IP address of the user is trying to access
> the CGI application through Nginx for the fourth time at 17:40:47. I want
> Nginx to let this fourth request go to the CGI application because 5
> seconds
> from HTTP code 401 have already passed.
>
> Can I do this with Nginx?
>
> Thank you if you answer.
>
> Posted at Nginx Forum: https://forum.nginx.org/read.
> php?2,270537,270537#msg-270537
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20161108/27d7a0bc/attachment.html>


More information about the nginx mailing list