Welcome! Log In Create A New Profile

Advanced

Re: proxy_ignore_headers doesn't seem to work

January 04, 2012 03:12PM
Maxim,

Sorry for the late response.

I'm trying to hide those headers, you can see it in config posted before:

proxy_ignore_headers X-Accel-Expires Expires Cache-Control Set-Cookie;
proxy_cache_valid 200 302 600h;
proxy_cache_valid any 90m;

But as you can see, you can find expire, cache-control headers in proxy repsonse, and also in headers of stored cache files on disk. With values from upstream server, not those set in config.


I'm not sure now those times from my previous response, but whatever i do (delete cached files from disk, restart nginx, wait 10 minutes to expire files cached on disk), nginx is always returning in response cache-control and expire in 600 sec - taking this value from upstream server, not from the config file. Also, file is stored on disk for 600s, after this time i can see in logs that nginx is downloading again file from upstream server. Nginx should cache files for 600h in current config, but i've also tried before other values, like 6h or 6d etc.

http://mpq1.XXX.com/tiles/1.0.0/osm/12/1035/1519.jpg

GET /tiles/1.0.0/osm/12/1035/1519.jpg HTTP/1.1
Host: mpq1.XXX.com
User-Agent: Mozilla/5.0 (Ubuntu; X11; Linux i686; rv:9.0.1) Gecko/20100101 Firefox/9.0.1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en,en-us;q=0.7,pl;q=0.3
Accept-Encoding: gzip, deflate
Accept-Charset: ISO-8859-2,utf-8;q=0.7,*;q=0.7
Connection: keep-alive
Cookie: bblastvisit=1325618979; bblastactivity=0; __utma=26892847.843027784.1325618982.1325618982.1325703951.2; __utmz=26892847.1325618982.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __qca=P0-367095175-1325618982208; bbsessionhash=02acddda9354e88dd04bab92358aeca6; __utmc=26892847

HTTP/1.1 200 OK
Server: nginx/1.0.11
Date: Wed, 04 Jan 2012 19:52:01 GMT
Content-Type: image/jpeg
Connection: keep-alive
Content-Length: 8010
Cache-Control: max-age=600
Last-Modified: Wed, 04 Jan 2012 02:18:15 GMT
Expires: Wed, 04 Jan 2012 20:02:01 GMT



Regards,
Piotr
Subject Author Posted

proxy_ignore_headers doesn't seem to work

piotr December 14, 2011 11:34AM

Re: proxy_ignore_headers doesn't seem to work

Maxim Dounin December 14, 2011 12:10PM

Re: proxy_ignore_headers doesn't seem to work

piotr December 16, 2011 09:11AM

Re: proxy_ignore_headers doesn't seem to work

Maxim Dounin December 18, 2011 06:18AM

Re: proxy_ignore_headers doesn't seem to work

piotr January 04, 2012 03:12PM

Re: proxy_ignore_headers doesn't seem to work

Francis Daly January 04, 2012 05:28PM

Re: proxy_ignore_headers doesn't seem to work

Francis Daly January 04, 2012 06:14PM

Re: proxy_ignore_headers doesn't seem to work

Maxim Dounin January 04, 2012 10:20PM

Re: proxy_ignore_headers doesn't seem to work

piotr January 09, 2012 01:50PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 245
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready