We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2425d9a + 09a2f4c commit 6704d10Copy full SHA for 6704d10
1 file changed
proxy.ts
@@ -83,7 +83,11 @@ export function proxy(req: NextRequest) {
83
export const config = {
84
// Match all pathnames except for
85
// - api / trpc:API 路由不进 i18n(无 UI,纯 fetch)
86
+ // - auth / oauth / analytics:next.config rewrites 直通后端的路径
87
+ // (登录 / OAuth / 埋点)。被 next-intl 加了 locale 前缀后,
88
+ // rewrite source(/oauth/:path*)不匹配带 locale 的版本(/en/oauth/...),
89
+ // 落到 [locale]/oauth/... 404。所以必须排除掉,让请求直接走 rewrite。
90
// - _next / _vercel:Next.js 内部
91
// - .*\..*:任何带 . 的路径(静态资源 / sitemap.xml / robots.txt 等)
- matcher: "/((?!api|trpc|_next|_vercel|.*\\..*).*)",
92
+ matcher: "/((?!api|trpc|auth|oauth|analytics|_next|_vercel|.*\\..*).*)",
93
};
0 commit comments