add drone.yaml

This commit is contained in:
simple321vip
2026-06-29 22:35:45 +08:00
parent 21b4897005
commit 6ed2fb8cac
3 changed files with 95 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
# 字符集 + gzip
charset utf-8;
gzip on;
gzip_types text/css application/javascript text/javascript application/json
image/svg+xml application/xml text/xml application/xml+rss;
# 安全 headers
add_header X-Content-Type-Options "nosniff" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
# SPA 回退(虽然当前没路由,但留个兜底)
location / {
try_files $uri $uri/ $uri.html /index.html;
}
# 静态资源缓存(图片 / css / js)
location ~* \.(css|js|jpg|jpeg|png|gif|svg|woff|woff2|ttf|eot)$ {
expires 30d;
add_header Cache-Control "public, max-age=2592000";
}
# 错误页 fallback
error_page 404 /index.html;
}