Nginx as a proxy and “fire-and-forget” requests

nginx

We are using nginx as a proxy for a Rails app, which processes callback requests. Some of these requests get sent to us in a "fire-and-forget" manner. Meaning, the client closes the connection, immediately after sending the request, without waiting for the response. Nginx cancels the request, logs a 499 and nothing gets through to the Rails app.

Can nginx be configured, so that it still relays the request to the Rails app, even when the client closes the connection, after it has been sent?

Best Answer

I was able to fix it with the proxy_ignore_client_abort parameter in the nginx config.