Skip to content

Commit

Permalink
test: console.log hosts and headers in sitemap queries
Browse files Browse the repository at this point in the history
  • Loading branch information
abvthecity committed May 28, 2024
1 parent 797b013 commit 0bb5922
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/ui/docs-bundle/src/utils/xFernHost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 0bb5922

Please sign in to comment.