Skip to content

Commit 3d6b214

Browse files
committed
重构中间件逻辑,将代理功能移至 middleware.ts,删除 proxy.ts 文件
1 parent 46d57af commit 3d6b214

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/site/app/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import { redirect } from 'next/navigation';
1010

1111
/**
12-
* Root page - redirects are handled by proxy.ts middleware
12+
* Root page - redirects are handled by middleware.ts
1313
* This page should never actually render as the middleware intercepts and redirects
1414
* But Next.js requires a page component for the route to be recognized
1515
*/
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { NextResponse, NextRequest, NextFetchEvent } from 'next/server';
1313
// Create fumadocs middleware
1414
const fumadocsMiddleware = createI18nMiddleware(i18n);
1515

16-
export default function proxy(request: NextRequest, event: NextFetchEvent) {
16+
export default function middleware(request: NextRequest, event: NextFetchEvent) {
1717
const path = request.nextUrl.pathname;
1818

1919
// Handle root path separately with custom language detection

0 commit comments

Comments
 (0)