docs(avatar): set production H5 domain
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
生产会会在用户已登录后打开以下地址:
|
||||
|
||||
```text
|
||||
https://<数字分身生产域名>/#/avatar/manage?token=<encodeURIComponent(会会 access token)>
|
||||
https://digital.99hui.com/#/avatar/manage?token=<encodeURIComponent(会会 access token)>
|
||||
```
|
||||
|
||||
测试环境示例:
|
||||
@@ -77,6 +77,8 @@ curl -fsS http://127.0.0.1:8099/api/health
|
||||
必须使用 HTTPS。同域部署时,H5 静态资源与 `/api/` 由同一域名提供,可避免跨域和 Cookie/来源策略问题。Nginx 关键配置示例:
|
||||
|
||||
```nginx
|
||||
server_name digital.99hui.com;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
@@ -106,6 +108,7 @@ location /api/ {
|
||||
6. 分身聊天 SSE 逐段输出正常,Markdown 正常渲染,知识库优先级和 Token 扣费正常。
|
||||
7. 开启 BOXIM 主动接管后保持在线,收到消息、三秒回复、已读回执和主人发言暂停均正常。
|
||||
8. 重建容器后数据库、头像、知识库文档仍存在,`/api/health` 返回成功。
|
||||
9. `https://digital.99hui.com/api/health` 可访问,证书域名和有效期正确,HTTP 自动跳转 HTTPS。
|
||||
|
||||
## 6. 回滚
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
/>
|
||||
<title>会会数字分身</title>
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||
<!-- 混合架构部署配置:web-view 内请把 apiBase 设为后端公网地址(如 'https://geo.99hui.com/api')。
|
||||
留空则回退为 '/api'(开发态由 Vite 代理到 :8000)。 -->
|
||||
<!-- digital.99hui.com 同域部署保持 apiBase 为空,接口使用 /api。
|
||||
仅跨域部署时才显式配置后端公网地址。 -->
|
||||
<script type="text/javascript">
|
||||
window.__APP_CONFIG__ = { apiBase: '' }
|
||||
</script>
|
||||
|
||||
@@ -9,8 +9,8 @@ interface ApiClient {
|
||||
|
||||
// API 基址:优先级 window.__APP_CONFIG__.apiBase > 环境变量 > 默认 '/api'
|
||||
// - 开发/Vite 代理:'/api'(由 vite.config 代理到后端 :8000)
|
||||
// - web-view 内(混合架构):需配置为后端公网地址,例如 'https://geo.99hui.com/api'
|
||||
// - 同域部署的构建产物:可保持 '/api'
|
||||
// - digital.99hui.com 同域部署:保持 '/api'
|
||||
// - 仅跨域部署时配置后端公网地址
|
||||
function resolveBaseURL(): string {
|
||||
const cfg = (window as any).__APP_CONFIG__
|
||||
if (cfg && cfg.apiBase) return cfg.apiBase as string
|
||||
|
||||
Reference in New Issue
Block a user