fix: honor admin-uploaded favicon in root metadata #274

This commit is contained in:
Linus Rath
2026-05-13 00:33:23 +02:00
parent 3f444a8912
commit ea424cad7e
2 changed files with 4 additions and 22 deletions
+4 -2
View File
@@ -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<Metadata> {
const faviconUrl = process.env.FAVICON_URL;
await configManager.ensureLoaded();
const faviconUrl = configManager.get<string>("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<Metadata> {
formatDetection: {
telephone: false,
},
...(faviconUrl ? { icons: { icon: faviconUrl } } : {}),
icons: { icon: faviconUrl },
};
}