From 562e7ba043944f59b8172d35434956b0f3b7c9ea Mon Sep 17 00:00:00 2001 From: Ashley Harrison Date: Tue, 11 Nov 2025 13:47:21 +0000 Subject: [PATCH] Frontend Service: Ensure the favicon/appletouchicon/loadinglogo are using the CDN url (#113699) * ensure the favicon, appletouchicon and loadinglogo are using the CDN url * add nosec comments since we control the cdn url --- pkg/api/index.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/api/index.go b/pkg/api/index.go index a928aca581c..1f85f2b0dbe 100644 --- a/pkg/api/index.go +++ b/pkg/api/index.go @@ -5,6 +5,7 @@ import ( "crypto/sha256" "encoding/hex" "fmt" + "html/template" "net/http" "strings" @@ -184,12 +185,12 @@ func (hs *HTTPServer) setIndexViewData(c *contextmodel.ReqContext) (*dtos.IndexV NewGrafanaVersionExists: hs.grafanaUpdateChecker.UpdateAvailable(), AppName: setting.ApplicationName, AppNameBodyClass: "app-grafana", - FavIcon: "public/img/fav32.png", - AppleTouchIcon: "public/img/apple-touch-icon.png", + FavIcon: template.URL(assets.ContentDeliveryURL + "public/build/img/fav32.png"), // #nosec G203 + AppleTouchIcon: template.URL(assets.ContentDeliveryURL + "public/build/img/apple-touch-icon.png"), // #nosec G203 AppTitle: "Grafana", NavTree: navTree, Nonce: c.RequestNonce, - LoadingLogo: "public/img/grafana_icon.svg", + LoadingLogo: template.URL(assets.ContentDeliveryURL + "public/build/img/grafana_icon.svg"), // #nosec G203 IsDevelopmentEnv: hs.Cfg.Env == setting.Dev, Assets: assets, }