nginx 配置禁止缓存HTML文件
location / {
root /home/work/project;
index index.html;
# 禁止缓存html
if ($request_filename ~* ^.*?.(html|htm)$) {
add_header Cache-Control "private, no-store, no-cache, must-revalidate, proxy-revalidate";
}
}
本文来自博客园,作者:0x1cc4,转载请注明原文链接:https://www.cnblogs.com/0x1cc4/p/17956871
浙公网安备 33010602011771号