front/nginx-k3s.conf
zzh a7993c12b6
All checks were successful
Build and Deploy Front / deploy (push) Successful in 4m18s
feat: 品牌/收款码图可清除,未配置显示 LOGO 文字
去掉本地默认品牌图回退;配置弹窗原生拖拽预览并支持清除;登录/顶栏/官网/侧栏统一走配置图。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-19 19:30:02 +08:00

69 lines
1.7 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# k3s 方案 A:仅静态 SPA。API 由浏览器按域名直连;TLS 由 Traefik 终结。
server {
listen 80;
server_name _;
gzip on;
gzip_vary on;
gzip_min_length 1024;
gzip_types text/plain text/css text/xml text/javascript application/javascript application/json application/xml image/svg+xml;
root /usr/share/nginx/html;
index index.html;
# 官网静态(若存在);否则回退 SPA
location = / {
try_files /site/index.html /index.html =404;
add_header Cache-Control "no-cache, no-store, must-revalidate";
add_header Pragma "no-cache";
add_header Expires "0";
}
location = /site {
return 301 /;
}
location = /site/ {
return 301 /;
}
location = /site/index.html {
return 301 /;
}
location ^~ /site/ {
try_files $uri =404;
expires 7d;
add_header Cache-Control "public";
access_log off;
}
location = /favicon.ico {
try_files /favicon.ico =404;
expires 7d;
add_header Cache-Control "public";
access_log off;
}
location = /index.html {
add_header Cache-Control "no-cache, no-store, must-revalidate";
add_header Pragma "no-cache";
add_header Expires "0";
}
# 微信域名校验文件
location ~* ^/MP_verify_[A-Za-z0-9]+\.txt$ {
try_files $uri =404;
add_header Cache-Control "no-cache";
}
location ~* \.(?:js|css|woff2?|ttf|eot|svg|png|jpe?g|gif|webp|ico|map)$ {
try_files $uri =404;
expires 7d;
add_header Cache-Control "public";
access_log off;
}
# SPA 路由回退
location / {
try_files $uri $uri/ /index.html;
}
}