possibble to use fastcgi cache with set-cookie header
Jools Wills
buzz at exotica.org.uk
Fri Aug 20 02:13:59 MSD 2010
Hi,
I'm wondering if it is possible to force fastcgi_cache even when there
is a Set-Cookie header? I was testing with
http://nginxtest.exotica.org.uk/index.php
which sets
Set-Cookie: site=nginxtest; HttpOnly
Expires: Thu, 19 Nov 1981 00:00:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
pre-check=0
Pragma: no-cache
but I can only cache it with nginx if i remove the Set-Cookie header.
my config.
http {
fastcgi_cache_path /var/cache/nginx levels=1:2
keys_zone=fastcgicache:10M;
}
server {
listen 80;
server_name nginxtest.exotica.org.uk;
root /path/to/website
index index.html index.php;
location ~ \.php$ {
fastcgi_cache_valid any 10m;
fastcgi_cache_key $host$request_uri;
fastcgi_ignore_headers Cache-Control Expires;
fastcgi_cache fastcgicache;
fastcgi_pass unix:/somepath/fcgi.sock
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
More information about the nginx
mailing list