在nginx配置文件中添加
add_header Cache-Control no-cache;
add_header Pragma no-cache;
add_header Expires 0;
设置响应头:
Cache-Control no-cache:服务器端缓存控制:不缓存。
Pragma no-cache:浏览器端缓存:不缓存。
Expires 0:缓存失效时间:0秒
server {
listen 80;
server_name sso.pinyougou.com;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
location / {
add_header Cache-Control no-cache;
add_header Pragma no-cache;
add_header Expires 0;
proxy_pass http://127.0.0.1:9108;
proxy_connect_timeout 600;
proxy_read_timeout 600;
}
}