chore: add configs + logo assets

This commit is contained in:
2026-08-25 16:29:08 +08:00
parent a56b920feb
commit 4a17e3be2b
13 changed files with 72 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
server {
listen 80;
server_name localhost;
root /usr/share/nginx/html;
index index.html;
# gzip 压缩
gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml text/javascript image/svg+xml;
gzip_min_length 256;
# SPA 路由 fallback:所有非文件请求回退到 index.html
location / {
try_files $uri $uri/ /index.html;
}
# 静态资源长缓存(Vite 构建产物带 hash)
location /assets/ {
expires 1y;
add_header Cache-Control "public, immutable";
}
# SVG / 图片缓存
location ~* \.(svg|png|jpg|jpeg|gif|ico|webp)$ {
expires 30d;
add_header Cache-Control "public";
}
}