Skip to content

Commit 0f4759f

Browse files
committed
Fix condition for VERCEL_URL
1 parent 6d77b64 commit 0f4759f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/gitbook-v2/src/middleware.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ function getSiteURLFromRequest(request: NextRequest): URLWithMode | null {
174174

175175
const isMainHost =
176176
(GITBOOK_URL && request.nextUrl.host === new URL(GITBOOK_URL).host) ||
177-
(process.env.VERCEL_URL && request.nextUrl.host === new URL(process.env.VERCEL_URL).host);
177+
(process.env.VERCEL_URL && request.nextUrl.host === process.env.VERCEL_URL);
178178
const isAssetsHost =
179179
GITBOOK_ASSETS_URL && request.nextUrl.host === new URL(GITBOOK_ASSETS_URL).host;
180180

0 commit comments

Comments
 (0)