From 688255f8bd4acf5e68ae7df522b1ad7f4d8ee105 Mon Sep 17 00:00:00 2001 From: m4x809 Date: Sat, 25 Oct 2025 14:11:55 +0200 Subject: [PATCH] Update absolute URL construction in favico API GET route to support environment variable --- src/app/api/favico/route.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/api/favico/route.tsx b/src/app/api/favico/route.tsx index 316494f..b4ccc3b 100644 --- a/src/app/api/favico/route.tsx +++ b/src/app/api/favico/route.tsx @@ -31,7 +31,7 @@ export async function GET(request: NextRequest) { console.log("🚀 ~ route.tsx:29 ~ GET ~ imagePath:", imagePath); // Build absolute URL for the redirect const { nextUrl } = request; - const absoluteUrl = `${nextUrl.protocol}//${nextUrl.host}${imagePath}`; + const absoluteUrl = urlENV ? `${urlENV}${imagePath}` : `${nextUrl.protocol}//${nextUrl.host}${imagePath}`; console.log("🚀 ~ route.tsx:33 ~ GET ~ absoluteUrl:", absoluteUrl); return NextResponse.redirect(absoluteUrl, 307);