Ignore content-type while forwarding to backend proxy

Francis Daly francis at daoine.org
Wed Dec 24 09:42:45 UTC 2014

On Wed, Dec 24, 2014 at 08:53:13AM +0200, Roland RoLaNd wrote:

Hi there,

> i tried doing that before though it did not work so i thought there could be another solution..in any case tried that again, set it right before the proxypass condition and it's still passing the type through...may i show u my config to see what might be overrirding that ? 

The following config snippet does for me what you say that you want:

  server {
    proxy_set_header Content-Type "";
    location /app {

The response from port 10080 shows me that a Content-Type header was
received by it when I comment the proxy_set_header line; and was not
when I do not.

I suspect that it will be useful if you can describe what exactly you
want nginx to send to upstream.

Be specific about "http request header" and "http request body"; and
for best chance of help, make it easy for someone else to reproduce the
problem that you are reporting.

proxy_set_header only modifies the http request header sent.

It does not modify any part of the http request body.

In the case of (for example) multipart/form-data, the http request body
can contain its own header-like data including Content-Disposition:
and Content-Type:.

Good luck with it,

Francis Daly        francis at daoine.org

More information about the nginx mailing list