在Nginx中覆盖Cache-Control:Private

10

请问有没有办法覆盖/删除通过反向代理的远程服务器返回的Cache-Control: private响应头?架构设置如下:

[我的服务器] --> [远程服务器]

我服务器上site-available/default的设置如下:

server {

        listen   80; ## listen for ipv4
        listen   [::]:80 default ipv6only=on; ## listen for ipv6

        server_name  localhost;


        location / {
            if ($arg_AWSACCESSKEY) {    
                proxy_pass http://localhost:8088;
            }
            try_files $uri $uri/ /index.php /index.html /index.htm;
        }
    # other setting goes here
}

我的服务器 site-available/remote 的设置:
server {
        listen   8088; ## listen for ipv4; this line is default and implied

        # Make site accessible from http://localhost/
        # server_name localhost;

        location / {
                proxy_pass http://remoteserver;
                proxy_set_header Host remoteserverhostname.com;
                proxy_ignore_headers Cache-Control Expires;
                proxy_pass_header Set-Cookie;

        }
}

但是Firebug仍然报告标头包含Cache-Control: private。我错过了什么吗?
谢谢。
1个回答

9

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接