Welcome! Log In Create A New Profile

Advanced

How to delay requests from once unauthorized IP address

October 25, 2016 09:01AM
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.
Subject Author Posted

How to delay requests from once unauthorized IP address

hide October 25, 2016 09:01AM

Re: How to delay requests from once unauthorized IP address

Andrei November 08, 2016 11:08AM

Re: How to delay requests from once unauthorized IP address

hide November 09, 2016 07:34AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 59
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready