refactor(frontend): 地址栏改成动态显示当前 host,不再写死任何域名
上次 filter-repo 把 api.wangjinding.com 直接替换成 127.0.0.1:8808,
是写死的 —— 用户从自己域名访问时会显示错误的地址。
这次改成 location.host:
· SideNav 的 logo 下方 → {{ apiHost }}(= location.host)
· MainLayout 副标题兜底 → location.host
· i18n 的「已连接 <域名>」→「已连接」
· 前端重新 build(不是打补丁),产物里没有任何写死的地址
实测:
http://localhost:8808 → 侧栏 localhost:8808 | 已连接
http://127.0.0.1:8808 → 侧栏 127.0.0.1:8808 | 已连接
顺带修掉 filter-repo 留下的一个错误 scheme:
gateway.yaml 的 cors 里出现了 https://127.0.0.1:8808(应为 http),已删除。
This commit is contained in:
1 parent
ebbe64ce61
commit
feb055d4e6
10 files changed
+17
-17
No files matched your search
@@ -1,7 +1,7 @@
|
||||
# 小银网关 Web 前端 —— 设计文档
|
||||
|
||||
> 版本 v0.1(待审)|2026-09-11
|
||||
> 对象:`https://127.0.0.1:8808`(网关,端口 8808,已开鉴权,127.0.0.1 反代对外)
|
||||
> 对象:`http://127.0.0.1:8808`(网关,端口 8808,已开鉴权,127.0.0.1 反代对外)
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in new issue
Block a user