清理无关配置
This commit is contained in:
@@ -21,7 +21,9 @@ type Config struct {
|
||||
Bind string `yaml:"bind"` // HTTP 绑定
|
||||
Domain string `yaml:"domain"` // 基础域名
|
||||
|
||||
// todo: 拆分 alias 和 db
|
||||
Database ConfigDatabase `yaml:"database"` // 配置
|
||||
|
||||
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"` // 缓存时间
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user