From 464c84b40fd22bc2e5d666e7cd01e6dd866acfbd Mon Sep 17 00:00:00 2001 From: Eddie Jaoude Date: Mon, 6 Nov 2023 10:26:15 +0000 Subject: [PATCH] fix: even more debugging for custom domain --- middleware.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/middleware.js b/middleware.js index a27ad379887..d5d2abfcb2e 100644 --- a/middleware.js +++ b/middleware.js @@ -25,7 +25,11 @@ export async function middleware(req) { const adminRequired = ["/admin", "/api/admin"]; const adminUsers = process.env.ADMIN_USERS.split(","); - console.log(`domain used "${hostname}" with path "${reqPathName}"`); + console.log( + `domain used "${hostname}" with path "${reqPathName}"`, + `Request Url "${req.url}"`, + `Req nextUrl "${req.nextUrl.host}"`, + ); // if custom domain + on root path if (hostname !== req.nextUrl.host && reqPathName === "/") { console.log(`custom domain used: "${hostname}"`);