From ea424cad7e2c4beabf4f8fc5a5c79d2aeb7b8baa Mon Sep 17 00:00:00 2001 From: Linus Rath <139418639+rathlinus@users.noreply.github.com> Date: Wed, 13 May 2026 00:33:23 +0200 Subject: [PATCH] fix: honor admin-uploaded favicon in root metadata #274 --- app/icon.svg | 20 -------------------- app/layout.tsx | 6 ++++-- 2 files changed, 4 insertions(+), 22 deletions(-) delete mode 100644 app/icon.svg diff --git a/app/icon.svg b/app/icon.svg deleted file mode 100644 index 39ffc6dd..00000000 --- a/app/icon.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - diff --git a/app/layout.tsx b/app/layout.tsx index c2a54606..573ed322 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -4,6 +4,7 @@ import { headers } from "next/headers"; import { getLocale } from "next-intl/server"; import { PWAInstallPrompt } from "@/components/pwa-install-prompt"; import { ServiceWorkerRegistration } from "@/components/service-worker-registration"; +import { configManager } from "@/lib/admin/config-manager"; import "./globals.css"; const geistSans = Geist({ @@ -17,7 +18,8 @@ const geistMono = Geist_Mono({ }); export async function generateMetadata(): Promise { - const faviconUrl = process.env.FAVICON_URL; + await configManager.ensureLoaded(); + const faviconUrl = configManager.get("faviconUrl", "/branding/Bulwark_Favicon.svg"); return { title: process.env.APP_NAME || process.env.NEXT_PUBLIC_APP_NAME || "Webmail", @@ -30,7 +32,7 @@ export async function generateMetadata(): Promise { formatDetection: { telephone: false, }, - ...(faviconUrl ? { icons: { icon: faviconUrl } } : {}), + icons: { icon: faviconUrl }, }; }