diff --git a/bun.lock b/bun.lock index 0e59b1dbd..31b607162 100644 --- a/bun.lock +++ b/bun.lock @@ -634,8 +634,6 @@ "@gitbook/emoji-codepoints": ["@gitbook/emoji-codepoints@workspace:packages/emoji-codepoints"], - "@gitbook/fontawesome-pro": ["@gitbook/fontawesome-pro@1.0.8", "", { "dependencies": { "@fortawesome/fontawesome-common-types": "^6.6.0" } }, "sha512-i4PgiuGyUb52Muhc52kK3aMJIMfMkA2RbPW30tre8a6M8T6mWTfYo6gafSgjNvF1vH29zcuB8oBYnF0gO4XcHA=="], - "@gitbook/icons": ["@gitbook/icons@workspace:packages/icons"], "@gitbook/openapi-parser": ["@gitbook/openapi-parser@workspace:packages/openapi-parser"], diff --git a/packages/gitbook-v2/src/middleware.ts b/packages/gitbook-v2/src/middleware.ts index 3ba0d98d3..0bd5a5205 100644 --- a/packages/gitbook-v2/src/middleware.ts +++ b/packages/gitbook-v2/src/middleware.ts @@ -352,6 +352,12 @@ function getSiteURLFromRequest(request: NextRequest): URLWithMode | null { return null; } + console.log( + 'requestHeaders', + request.headers.entries().map(([key, value]) => [key, value]) + ); + console.log('nextUrl', request.nextUrl.toString()); + const xForwardedHost = request.headers.get('x-forwarded-host'); // The x-forwarded-host is set by Vercel for all requests // so we ignore it if the hostname is the same as the instance one.