cookie 导致 proxy_cache 不生效

proxy_ignore_headers "Cache-Control" "Expires" "Set-Cookie" "Vary";

解决

location / {

        proxy_cache cache_m;
        proxy_cache_valid  200 304 6h;
        proxy_cache_key $host$uri$is_args$args;
        proxy_ignore_headers "Cache-Control" "Expires" "Set-Cookie" "Vary";
        add_header  Nginx-Cache "$upstream_cache_status";
        include proxy.conf;
        proxy_pass http://server;
        expires 6h;
    }

你可能感兴趣的:(cookie 导致 proxy_cache 不生效)