清理无关配置

This commit is contained in:
ExplodingDragon
2025-11-25 00:39:45 +08:00
parent b2c8af4612
commit 1d5ee041aa
2 changed files with 5 additions and 11 deletions

View File

@@ -21,8 +21,10 @@ type Config struct {
Bind string `yaml:"bind"` // HTTP 绑定
Domain string `yaml:"domain"` // 基础域名
// todo: 拆分 alias 和 db
Database ConfigDatabase `yaml:"database"` // 配置
Event ConfigEvent `yaml:"event"` // 事件传递
Event ConfigEvent `yaml:"event"` // 事件传递
Auth ConfigAuth `yaml:"auth"` // 后端认证配置
@@ -81,14 +83,6 @@ type ConfigEvent struct {
URL string `yaml:"url"`
}
type ConfigProxy struct {
Enable bool `yaml:"enable"` // 是否允许反向代理
}
type ConfigRender struct {
Enable bool `yaml:"enable"` // 是否开启渲染器
}
type ConfigCache struct {
Meta string `yaml:"meta"` // 元数据缓存
MetaTTL time.Duration `yaml:"meta_ttl"` // 缓存时间

View File

@@ -55,8 +55,8 @@ func NewPageServer(
filterConfig map[string]map[string]any,
) (*Server, error) {
svcMeta := core.NewServerMeta(client, backend, domain, cacheMeta, cacheMetaTTL)
pageMeta := core.NewPageDomain(svcMeta, core.NewDomainAlias(db.Child("config").Child("alias")), domain, defaultBranch)
globCache, err := lru.New[string, glob.Glob](256)
pageMeta := core.NewPageDomain(svcMeta, core.NewDomainAlias(db.Child("config", "alias")), domain, defaultBranch)
globCache, err := lru.New[string, glob.Glob](512)
if err != nil {
return nil, err
}