proxy_ignore_client_abort: need conditional behavior based on response status code
0 reputation · 09 Feb 2020, 20:58 UTC
proxy_ignore_client_abort conditional behavior
The goal is to have nginx continue fetching from an upstream server only when the client aborts and the upstream response is expected to be successful (e.g., 2xx status), while aborting the upstream connection for other cases such as error responses.
Currently the directive offers only a global on/off switch; there is no way to tie its behavior to response attributes like status code, content length, or request headers.
This limitation forces administrators to choose between wasting upstream resources on aborts or losing potential side‑effects from long‑running processes that might still be useful even after the client disconnects.
- Can proxy_ignore_client_abort be made conditional on the upstream response status code?
- If not, what alternative nginx directives or patterns can approximate selective continuation based on response characteristics?
- Are there any ongoing discussions or patches that would add per‑condition support to this directive?