diff --git a/apps/scandic-redirect/netlify/functions/redirect.mts b/apps/scandic-redirect/netlify/functions/redirect.mts index 139fdee08..160202846 100644 --- a/apps/scandic-redirect/netlify/functions/redirect.mts +++ b/apps/scandic-redirect/netlify/functions/redirect.mts @@ -52,11 +52,18 @@ export default async (req: Request) => { ? redirectUrl.slice(0, -1) : redirectUrl; if (redirectUrlWithoutTrailingSlash === body.pathname) { + console.log( + `[scandic-redirect] recieved ${body.pathname}, found ${redirectUrlWithoutTrailingSlash}, no-op` + ); return new Response("Not Found", { status: 404 }); } + console.log( + `[scandic-redirect] recieved ${body.pathname}, return ${redirectUrlWithoutTrailingSlash}, success` + ); return new Response(redirectUrlWithoutTrailingSlash); } } + console.log(`[scandic-redirect] recieved ${body.pathname}, not found`); return new Response("Not Found", { status: 404 }); } catch (error) { return new Response("Bad request", { status: 400 });