✨ feat(bookSource): 聚合书源适配阅读 app 并完善评论体验
- 聚合书源取代早期书源版本:发现页筛选宫格/分类宫格、x:t:m:d: 前缀搜索、 fqtab 类型随书切换、段评气泡(内置六种样式可配);showCmt 能力检测,魔改版 原地弹窗(点遮罩关闭)、官方阅读降级 startBrowser;jsLib 不引用规则变量, searchUrl 修正编码与作用域 - 评论页:注入绝对 API_BASE,修复弹窗 WebView 内切换排序/懒加载失败; externalBaseURL 识别 X-Forwarded-Proto,气泡 ident 不再硬编码 http; 顶栏固定(拖拽把手)+评论区独立滚动 - 部署:nginx 模板自带 443/证书配置,防止 --sync-nginx 覆盖证书段;证书方案 从 certbot 迁移到 acme.sh(CERT_DIR 可配置) - 忽略 .codegraph 本地索引目录
This commit is contained in:
1 parent
49d0a371fb
commit
0b0794113f
7 files changed
+272
-76
No files matched your search
@@ -124,23 +124,17 @@ func addReviewToContent(jsonResult, itemID string, r *http.Request) string {
|
||||
}
|
||||
}
|
||||
|
||||
// 获取基础 URL
|
||||
// 获取基础 URL(反代场景识别 X-Forwarded-Proto,避免生成 http:// 被 301)
|
||||
cfg := config.GetConfig()
|
||||
baseURL := ""
|
||||
if cfg != nil {
|
||||
if r.Host != "" {
|
||||
baseURL = externalBaseURL(r)
|
||||
} else if cfg != nil {
|
||||
host := cfg.Server.Host
|
||||
if host == "0.0.0.0" {
|
||||
host = "localhost"
|
||||
}
|
||||
port := cfg.Server.Port
|
||||
scheme := "http"
|
||||
|
||||
// 检查是否来自外部请求
|
||||
if r.Host != "" {
|
||||
baseURL = scheme + "://" + r.Host
|
||||
} else {
|
||||
baseURL = scheme + "://" + host + ":" + port
|
||||
}
|
||||
baseURL = "http://" + host + ":" + cfg.Server.Port
|
||||
}
|
||||
|
||||
// 生成带段评标记的内容
|
||||
|
||||
Reference in new issue
Block a user