Ignore content-type while forwarding to backend proxy

Maxim Dounin mdounin at mdounin.ru
Tue Dec 23 15:42:50 UTC 2014


On Tue, Dec 23, 2014 at 05:10:09PM +0200, Roland RoLaNd wrote:

> one of my apps, specifically those on IOS forwarded a 
> content-type header..this is causing my backend server to mess 
> up its security signature check....
> i need to be able to ignore content-type headers...
> assigning the header as empty "" does not work, 
> (proxy_set_header Accept-Encoding "";)and also tried mapping the 
> content-type and using the variable... though that did not work 
> either as backend is very strict in that regard...
> i need to be able to ignore it completely...
> i tried adding proxy_hide_header Content-Type;
> and tested,it's still sending content-type while directing 
> traffic to backend..
> any advice?

To control headers sent by nginx to backends you have to use the 
"proxy_set_header" directive.  If you want to hide Content-Type, 
use this:

    proxy_set_header Content-Type "";

More information can be found in the documentation here:


Maxim Dounin

More information about the nginx mailing list