不让 nginx 缓存 html、htm

发布时间 2023-05-08 15:30:50作者: Nihaorz
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;
}