chore: cache learning map images
This commit is contained in:
@@ -26,7 +26,14 @@ server {
|
||||
add_header Cache-Control "no-store";
|
||||
}
|
||||
|
||||
# 一图流图片目录,由 Docker 挂载提供,支持运行时新增图片
|
||||
# 一图流图片文件缓存 30 天;新增图片建议使用新文件名,避免同名覆盖缓存未刷新
|
||||
location ~* ^/learning-images/.+\.(png|jpg|jpeg|webp|gif|avif)$ {
|
||||
root /usr/share/nginx/html;
|
||||
expires 30d;
|
||||
add_header Cache-Control "public, max-age=2592000";
|
||||
}
|
||||
|
||||
# 一图流图片目录,由 Docker 挂载提供;目录列表不缓存,保证新增图片能及时被页面发现
|
||||
location /learning-images/ {
|
||||
alias /usr/share/nginx/html/learning-images/;
|
||||
autoindex on;
|
||||
|
||||
Reference in New Issue
Block a user