Skip to content

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.

fix: branding favicon might be empty

sy-records264f927433f8
diff --git a/internal/controller/template_render/question.go b/internal/controller/template_render/question.go
index 83d08dc7..b9753618 100644
--- a/internal/controller/template_render/question.go
+++ b/internal/controller/template_render/question.go
@@ -96,9 +96,9 @@ func (t *TemplateRenderController) OpenSearch(ctx *gin.Context) {
return
}
- favicon := "favicon.ico"
+ favicon := general.SiteUrl + "/favicon.ico"
branding, err := t.siteInfoService.GetSiteBranding(ctx)
- if err == nil {
+ if err == nil && len(branding.Favicon) > 0 {
favicon = branding.Favicon
}