Add URL argument to Dockerfile and log environment variable in favico API

This commit is contained in:
m4x809 2025-10-25 14:10:11 +02:00
parent 7461820ede
commit 8d99f739c1
Signed by: m4x809
SSH key fingerprint: SHA256:YCoFF78p2DUP94EnCScqLwldjkKDwdKSZq3r8p/6EiU
2 changed files with 4 additions and 0 deletions

View file

@ -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

View file

@ -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");