import { getBrandAssets } from "@/lib/brand"; import { renderBrandIcon } from "@/lib/brand-icon"; export const size = { width: 512, height: 512 }; export const contentType = "image/png"; // Das Favicon ist im Admin austauschbar (Inhalte > Logo und Favicon) — nicht // zur Build-Zeit einfrieren. "no-cache" statt langem Caching: Browser halten // Favicons sonst tagelang fest, ein neues Bild waere nicht zu sehen. export const dynamic = "force-dynamic"; /** * Favicon und Manifest-Icon. 512 px, weil dieselbe Datei auch als Android- * Startbildschirm-Icon dient (app/manifest.ts); Browser skalieren fuer den * Tab selbst herunter. /favicon.ico wird in next.config.ts hierher * umgeleitet. */ export default async function Icon(): Promise { const { favicon } = await getBrandAssets(); const png = await renderBrandIcon(favicon, size.width); return new Response(new Uint8Array(png), { headers: { "Content-Type": contentType, "Cache-Control": "no-cache" }, }); }