Welcome! Log In Create A New Profile

Advanced

Re: Limit_req_status code less than 400

Maxim Dounin
October 28, 2013 02:20PM
Hello!

On Mon, Oct 28, 2013 at 11:51:42AM -0200, Guido Accardo wrote:

> Hi everyone,
>
> I'm configuring nginx's module HttpLimitReqModule to limit requests at 2K
> r/s. I realize that this module only can return codes between 400 and 599
> and as in my team we are developing Real Time Bedding we need to response
> http 204 No Content to those requests that exceeds our limit. Since this
> seems impossible to do by configuring nginx in a different way I'm planning
> to modify the code. Could you give me an idea in which parts of the code
> should I look at in order to modify them?

There is no need to modify the code, just use error_page
directive.

error_page 503 = /empty;

location = /empty {
return 204;
}

--
Maxim Dounin
http://nginx.org/en/donation.html

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Limit_req_status code less than 400

Guido Accardo 1068 October 28, 2013 09:54AM

Re: Limit_req_status code less than 400

Maxim Dounin 410 October 28, 2013 02:20PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

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