I have trouble trying to make Nginx ignore and hide some headers from a proxied server.
I want Nginx to hide and ignore the "Cache-Control" and "Server" headers but it didn't work, I don't know why.
My conf is as follows :
location / {
proxy_pass http://111.131.50.42;
proxy_hide_header Cache-Control;
expires 60M;
add_header Cache-Control "public";
proxy_ignore_headers Cache-Control;
proxy_hide_header Cache-Control;
access_log off;
}
But even with that I'm still receiving the origin "Cache-Control" and "Server" headers.
Do you know what I'm doing wrong?
P.S. I can't use ngx_headers_more module. I'm not able to add this module to our Nginx installation.