fix: serve embed entry for Lite routes - #2672
Open
ttommybot wants to merge 1 commit into
Open
Conversation
sakitam-fdd
added a commit
to sakitam-fdd/WeKnora
that referenced
this pull request
Aug 21, 2026
Port Tencent#2672 onto the current fork staging branch using GitHub's three-way merge.
sakitam-fdd
added a commit
to sakitam-fdd/WeKnora
that referenced
this pull request
Aug 21, 2026
Port Tencent#2672 after current-main three-way validation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
修复 Lite 部署中 Embed 页面静态路由回退错误的问题。
管理页生成的 Embed 地址使用
/embed/{channelId}。标准部署的 Nginx 会将该路径正确回退到独立的embed.html,但 Lite 的 Go 静态文件服务此前会统一回退到主站index.html,导致 Embed 地址加载管理后台入口,而不是 Embed 应用。本次修改:
/embed/*路径回退到embed.html。index.html。embed.html时返回 404,并记录警告,避免错误地返回管理后台页面。Type of Change
Related Issue
N/A
Testing
已完成以下验证:
git diff --check通过。golang:1.26-bookworm镜像中运行聚焦测试:go test internal/router/static.go internal/router/router_static_test.go -count=1go test ./internal/router -count=1 -p=1,但下载github.com/pierrec/lz4/v4和github.com/go-ego/gse间接依赖时网络连接被重置,因此完整包测试未能完成;失败发生在依赖下载阶段,不是编译或测试断言失败。Checklist
git diff --check origin/main...HEADpassesgolangci-lint run --new-from-rev=origin/main ./...)docs/, Swagger annotations, etc.)Screenshots / Recordings
N/A — no user-visible UI changes