我有一个pwa
,并且我不想缓存index.html
和service-worker.js
,如何配置nginx
?
这是我的配置:
server {
server_name xxx.com;
root path/static_dir;
index index.html;
location / {
try_files $uri $uri/ @rewrites;
}
location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
expires max;
}
}