-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Open
Labels
Description
Describe the feature you'd like to add to nginx
From the official NGINX auth_request at https://nginx.org/en/docs/http/ngx_http_auth_request_module.html#auth_request we read that If it returns 401 or 403, the access is denied with the corresponding error code. Any other response code returned by the subrequest is considered an error.
What we'd like to obtain is:
- to expand the number of 4xx errors returned by this endpoint (like 429), or…
- to make the list of errors configurable, in a similar way like
proxy_cache_validworks
Describe the problem this feature solves
We use NGINX and the auth_request in many situations where custom rate limits (not related to HTTP traffic) are a need. The current implementation returns to users only 401 or 403 errors.
So, when our auth_request subrequest returns something like an HTTP 429, the error for the user is a simple http 500.