feat(routers): 平台后台 SPA 由 Go 自己吐,绕开 nginx 反代缺失

This commit is contained in:
hero920103 committed 2026-10-19 00:57:10 +08:00
1 parent d48c012e68
commit 5718a00e31
4 files changed
+106

No files matched your search

+10
View File
@@ -2,6 +2,16 @@
httpport = 9000
runmode = dev
# ==================== 平台后台 SPA 静态托管 ====================
# 之前 platform.yunzer.cn 的 SPA 静态文件依赖 nginx 在对应 server 块里
# 配 location ~ ^/(platform|backend|auth|api|app)/ { proxy_pass ... } 反代到 Go,
# 而 nginx 默认 server 块经常只有 root + static,缺这条就会让所有 API 请求 404。
# 现在由 Go 自己吐这些 host 的 SPA 静态;/platform|/backend|/auth|/api|/app
# 仍走 beego Router;/uploads|/themes 走 main.go 注册的 SetStaticPath。
# 多 host 用英文逗号分隔;目录留空则关闭该功能,回落到由 nginx 自行处理。
platform_spa_dir = /www/wwwroot/platform.yunzer.cn/output
platform_spa_hosts = platform.yunzer.cn
# 启用请求体复制(允许多次读取请求体)
copyrequestbody = true