From 8d99f739c1e22c92e5bd27904bc00c35230aaa31 Mon Sep 17 00:00:00 2001 From: m4x809 Date: Sat, 25 Oct 2025 14:10:11 +0200 Subject: [PATCH] Add URL argument to Dockerfile and log environment variable in favico API --- Dockerfile | 1 + src/app/api/favico/route.tsx | 3 +++ 2 files changed, 4 insertions(+) diff --git a/Dockerfile b/Dockerfile index 78ec0c7..474231d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,6 +5,7 @@ WORKDIR /app # Simplified copy of package files COPY package.json bun.lock next.config.ts ./ ARG NPM_FONT_AWESOME +ARG URL RUN bun install # Stage 2: Build Next.js with bun diff --git a/src/app/api/favico/route.tsx b/src/app/api/favico/route.tsx index 5eb99a8..316494f 100644 --- a/src/app/api/favico/route.tsx +++ b/src/app/api/favico/route.tsx @@ -4,6 +4,9 @@ import { cookies } from "next/headers"; // Absolute URL redirect is required by Next.js middleware & API routes export async function GET(request: NextRequest) { + const urlENV = process.env.URL; + console.log("🚀 ~ route.tsx:9 ~ GET ~ urlENV:", urlENV); + const url = new URL(request.url); console.log("🚀 ~ route.tsx:8 ~ GET ~ url:", url); const randParam = url.searchParams.get("rand");