不让 nginx 缓存 html、htm

location / {
    if ($request_filename ~* .*\.(?:htm|html)$) {
        add_header Cache-Control "private, no-store, no-cache, must-revalidate, proxy-revalidate";
    }
    root   html;
    index  index.html index.htm;
}

 

posted @ 2023-05-08 15:23  Nihaorz  阅读(211)  评论(0)    收藏  举报