渠道: 移除主页/favicon 特性, Base URL 可选+完整地址
- 回退渠道 homepage/favicon 字段与代理接口(未采用) - Base URL 改为可选: 留空按供应商默认(openai/anthropic), 兼容兼容型渠道必须填; 填完整地址(含 /v1)时归一化去尾 - 网关 upstreamURL 兜底去 /v1, 避免路径重复 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -5,7 +5,6 @@ import (
|
||||
"encoding/json"
|
||||
"net/http"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -18,20 +17,9 @@ import (
|
||||
// Handler 聚合所有管理 API。
|
||||
type Handler struct {
|
||||
a *app.App
|
||||
|
||||
favMu sync.Mutex
|
||||
favCache map[uint64]favEntry // 渠道 favicon 内存缓存
|
||||
}
|
||||
|
||||
type favEntry struct {
|
||||
data []byte
|
||||
ct string
|
||||
at time.Time
|
||||
}
|
||||
|
||||
func NewHandler(a *app.App) *Handler {
|
||||
return &Handler{a: a, favCache: map[uint64]favEntry{}}
|
||||
}
|
||||
func NewHandler(a *app.App) *Handler { return &Handler{a: a} }
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// 认证
|
||||
|
||||
Reference in New Issue
Block a user