How to make nginx return response body for 4xx and 5xx?

Looks like nginx removes response body when HTTP code is 4xx/5xx.

Is there a way to make nginx proxy the original response body?

Posted at Nginx Forum:

Hello!

On Wed, Dec 09, 2015 at 10:57:08AM -0500, ibmed wrote:

Looks like nginx removes response body when HTTP code is 4xx/5xx.

Is there a way to make nginx proxy the original response body?

This is what nginx does by default. If you see response bodies
removed in your setup, you’ve probably explicitly asked nginx to
do so using the proxy_intercept_errors directive. See
Module ngx_http_proxy_module for details.


Maxim D.
http://nginx.org/

Sorry to bother everyone. Nginx proxies everything just fine. The issue
was
at the upstream side.

Posted at Nginx Forum: