只是想知道是否有任何方法可以覆蓋/丟棄響應Cache-Control:來自代理遠程服務器的專用。該安裝程序體系結構是這樣的(是的,這是一個反向代理的設置):覆蓋Cache-Control:Nginx專用
[我的服務器] - > [遠程服務器]
對我的服務器站點提供的設置/默認:
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
}
設置爲我的服務器站點可用/遠程:
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;
}
}
但仍螢火蟲報頭包含緩存控制:私人。我錯過了什麼嗎?
謝謝。
如果@ kolbyjack的答案幫助你,請「檢查」作爲正確答案,並給他的功勞。謝謝。 – 2012-01-04 13:48:40