fix(deploy): 线上路由 - 修复 canvas 访问跳转到容器端口

This commit is contained in:
ddCat
2026-08-19 23:44:51 +08:00
parent 298b5ebf1f
commit 03053c356e
2 changed files with 11 additions and 0 deletions

View File

@@ -4,6 +4,7 @@
## v1.1.3
- 修复 `/canvas` 路由与静态模型目录同名导致的容器端口跳转,确保域名访问保持原有 HTTPS 地址。
- 修复系统文本模型中转先读取完整响应才返回的问题,恢复 OpenAI Responses、Chat Completions 与 Gemini 的 SSE 增量输出,并补齐多层 Nginx 的禁缓冲信号传递。
- 火山方舟 Seedream 图片生成显式关闭“AI 生成”水印,并要求生成响应直接返回 Base64 后写入服务器或对象存储,避免为持久化结果再次请求方舟 CDN;中转服务忽略返回格式时仍保留 URL 下载兼容。
- 项目开源协议由 AGPL-3.0 调整为 MIT,保留上游及项目贡献者版权声明。

View File

@@ -108,6 +108,16 @@ server {
try_files $uri $uri/ /index.html;
}
# /canvas 同时是 React 路由和静态模型资源目录;精确命中路由时必须优先回退到 SPA,
# 否则 try_files 会把它当作目录并生成带容器端口的 301。
location = /canvas {
try_files /index.html =404;
}
location = /canvas/ {
try_files /index.html =404;
}
location / {
try_files $uri $uri/ /index.html;
}