chore: sync local changes (2026-03-12)

This commit is contained in:
2026-03-12 18:58:40 +08:00
parent 1123d6aef2
commit 4cc8ec9486
21 changed files with 4561 additions and 270 deletions

View File

@@ -0,0 +1,41 @@
server {
listen 8989;
server_name mengyalinkfly-frontend; # 前端服务器IP
root /shumengya/www/mengyalinkfly-frontend;
index index.html index.htm;
# 短链跳转4位字符的路径直接转发到后端服务器支持wget等命令行工具
location ~ "^/[a-zA-Z0-9]{4}$" {
proxy_pass http://192.168.1.233:7878;
proxy_set_header Host short.api.shumengya.top;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
# 后端 API 代理到后端服务器
location /api {
proxy_pass http://192.168.1.233:7878;
proxy_set_header Host short.api.shumengya.top;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
# 前端路由
location / {
try_files $uri $uri/ /index.html;
}
# 禁止访问隐藏文件
location ~ /\. {
deny all;
}
# 设置静态文件缓存
location ~* \.(jpg|jpeg|png|gif|ico|css|js|svg)$ {
expires 30d;
add_header Cache-Control "public, immutable";
}
}