From 0bb59227843dc5bd498aa1285c621cd9cd1468e8 Mon Sep 17 00:00:00 2001 From: Andrew Jiang Date: Tue, 28 May 2024 17:48:30 -0400 Subject: [PATCH] test: console.log hosts and headers in sitemap queries --- packages/ui/docs-bundle/src/utils/xFernHost.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/ui/docs-bundle/src/utils/xFernHost.ts b/packages/ui/docs-bundle/src/utils/xFernHost.ts index e8d99c705e..4bf3f8b762 100644 --- a/packages/ui/docs-bundle/src/utils/xFernHost.ts +++ b/packages/ui/docs-bundle/src/utils/xFernHost.ts @@ -17,11 +17,15 @@ export function getXFernHostEdge(req: NextRequest, useSearchParams = false): str useSearchParams ? req.nextUrl.searchParams.get("host") : undefined, process.env.NEXT_PUBLIC_DOCS_DOMAIN, req.cookies.get("_fern_docs_preview")?.value, - // req.headers.get("x-forwarded-host"), req.headers.get("x-fern-host"), req.nextUrl.host, ]; + // eslint-disable-next-line no-console + console.log("hosts", hosts); + // eslint-disable-next-line no-console + console.log("headers", Array.from(req.headers.entries())); + for (let host of hosts) { host = cleanHost(host); if (host != null) {