Nginx - Rate limit when origin server response code is 401

veerareddy nginx-forum at forum.nginx.org
Thu Apr 26 17:10:10 UTC 2018


Hello Viet,

I posted the same question on Digital Ocean forums and got a response
suggesting to intercept errors from upstream and to rate limit based on the
error using the `error_page` directive. I haven't tried it myself yet but
it's worth a shot. Here's a link to the full post:
https://www.digitalocean.com/community/questions/use-nginx-to-rate-limit-only-when-origin-server-response-code-is-401.
Let me know if this works for you.

Regards,
Krishna Veera Reddy

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,279547,279595#msg-279595



More information about the nginx mailing list