Skip to content

Commit 1344754

Browse files
committed
v2: enable skipTrailingSlashRedirect in the middleware
1 parent 0f4759f commit 1344754

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/gitbook-v2/src/middleware.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ import { GITBOOK_ASSETS_URL, GITBOOK_URL } from '@v2/lib/env';
1212
import { MiddlewareHeaders } from '@v2/lib/middleware';
1313

1414
export const config = {
15-
matcher: ['/((?!_next/static|_next/image).*)'],
15+
matcher: [
16+
'/((?!_next/static|_next/image|~gitbook/static|~gitbook/revalidate|~gitbook/monitoring|~scalar/proxy).*)',
17+
],
18+
skipTrailingSlashRedirect: true,
1619
};
1720

1821
type URLWithMode = { url: URL; mode: 'url' | 'url-host' };

0 commit comments

Comments
 (0)