diff --git a/docker/nginx.common.conf b/docker/nginx.common.conf index 3d94d3cf..9da6f77b 100644 --- a/docker/nginx.common.conf +++ b/docker/nginx.common.conf @@ -70,7 +70,6 @@ location /api { proxy_read_timeout 600s; } -# ========= 静态资源缓存 ========= # 图片类静态资源 location ~* \.(png|jpg|jpeg|gif|ico|svg)$ { expires 1y; @@ -78,7 +77,7 @@ location ~* \.(png|jpg|jpeg|gif|ico|svg)$ { } # JS 和 CSS 静态资源缓存(排除 /api/v1 路径) -location ~* ^/(?!api/v1).*\.((js|css))$ { +location ~* ^/(?!api/v1).*\.(js|css)$ { try_files $uri =404; expires 30d; add_header Cache-Control "public";