--- src/http/modules/ngx_http_auth_request_module.c.orig 2022-05-24 02:59:19.000000000 +0300 +++ src/http/modules/ngx_http_auth_request_module.c 2022-06-15 13:25:42.267642000 +0300 @@ -134,7 +134,11 @@ /* return appropriate status */ - if (ctx->status == NGX_HTTP_FORBIDDEN) { + if (ctx->status == NGX_HTTP_FORBIDDEN || + ctx->status == NGX_HTTP_BAD_REQUEST || + ctx->status == NGX_HTTP_TOO_MANY_REQUESTS || + ctx->status == NGX_HTTP_PRECONDITION_FAILED || + ctx->status == NGX_HTTP_CLOSE) { return ctx->status; }