server {
listen 18080;
server_name localhost;
error_page 500 502 503 504 /50x.html;
location / {
root /Users/huangqingpeng/Desktop/workspaces/qiankun/vue-qiankun-demo/dist;
try_files $uri $uri/ /index.html;
index index.html index.htm;
if ($request_filename ~* .*\.(?:htm|html)$)
{
add_header Cache-Control "private, no-store, no-cache, must-revalidate, proxy-revalidate";
}
if ($request_filename ~* .*\.(?:js|css)$)
{
expires 1d;
}
if ($request_filename ~* .*\.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm)$)
{
expires 1d;
}
}
}
nginx浏览器缓存设置
最新推荐文章于 2023-01-13 17:43:21 发布