mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-24 11:26:31 +00:00
log all header
This commit is contained in:
@@ -171,6 +171,10 @@ function serveErrorResponse(error: Error) {
|
||||
* URL is taken from the pathname.
|
||||
*/
|
||||
function getSiteURLFromRequest(request: NextRequest): URLWithMode | null {
|
||||
request.headers.forEach((value, key) => {
|
||||
console.log('header', { key, value });
|
||||
});
|
||||
|
||||
const xGitbookUrl = request.headers.get('x-gitbook-url');
|
||||
if (xGitbookUrl) {
|
||||
return {
|
||||
@@ -200,7 +204,6 @@ function getSiteURLFromRequest(request: NextRequest): URLWithMode | null {
|
||||
}
|
||||
|
||||
const xForwardedHost = request.headers.get('x-forwarded-host');
|
||||
console.log('x-forwarded-host', xForwardedHost);
|
||||
// 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.
|
||||
if (xForwardedHost) {
|
||||
|
||||
Reference in New Issue
Block a user