Welcome! Log In Create A New Profile

Advanced

Patch proposal: allow alternatives to 503 status code in limit_req module

Nick Marden
March 01, 2013 09:24PM
Hey there,

I've been doing some work using limit_req to prevent overzealous clients
from DOS'ing my site. Specifically, I wanted to use a different HTTP status
code such as 420 or 429 so that it would be straightforward to show a "hey
man, chill out" page rather than my generic 503 error page.

Attached is a patch that enables this option for the limit_req directive.
It still defaults to 503, but you can set it to any 4xx or 5xx value of
your choosing by specifying

limit_req zone=foo burst=10 status_code=420;

for example.

I hope I've sent this to the right place. Please let me know where else to
send it if I'm in the wrong place.

Cheers,

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

Patch proposal: allow alternatives to 503 status code in limit_req module Attachments

Nick Marden 879 March 01, 2013 09:24PM

Re: Patch proposal: allow alternatives to 503 status code in limit_req module

Maxim Dounin 368 March 02, 2013 06:16PM

Re: Patch proposal: allow alternatives to 503 status code in limit_req module Attachments

Nick Marden 434 March 05, 2013 01:30PM

Re: Patch proposal: allow alternatives to 503 status code in limit_req module

Maxim Dounin 349 March 18, 2013 10:52AM



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

Online Users

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