mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-23 00:38:33 +02:00
improved homepage support, memory leak partial fix
This commit is contained in:
@@ -71,17 +71,11 @@ func (cfg *Config) HomepageConfig() H.HomePageConfig {
|
||||
if item.Category == "" {
|
||||
item.Category = "Docker"
|
||||
}
|
||||
if item.Icon == "" {
|
||||
item.Icon = "🐳"
|
||||
}
|
||||
item.SourceType = string(PR.ProviderTypeDocker)
|
||||
} else if p.GetType() == PR.ProviderTypeFile {
|
||||
if item.Category == "" {
|
||||
item.Category = "Others"
|
||||
}
|
||||
if item.Icon == "" {
|
||||
item.Icon = "🔗"
|
||||
}
|
||||
item.SourceType = string(PR.ProviderTypeFile)
|
||||
}
|
||||
|
||||
@@ -90,6 +84,7 @@ func (cfg *Config) HomepageConfig() H.HomePageConfig {
|
||||
item.URL = fmt.Sprintf("%s://%s.%s:%s", proto, strings.ToLower(alias), domains[0], port)
|
||||
}
|
||||
}
|
||||
item.AltURL = r.URL().String()
|
||||
|
||||
hpCfg.Add(&item)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user