diff --git a/app/components/ui-lib.tsx b/app/components/ui-lib.tsx index 1d087be6d..d8bef4c2f 100644 --- a/app/components/ui-lib.tsx +++ b/app/components/ui-lib.tsx @@ -599,7 +599,7 @@ export function ModalSelector(props: { onClose?: () => void; multiple?: boolean; }) { - console.log("-----", props); + // console.log("-----", props); const getCheckCardAvatar = (value: string): React.ReactNode => { if (value.startsWith("gpt")) { diff --git a/lib/auth.ts b/lib/auth.ts index 39dd5be54..d9d646ad8 100644 --- a/lib/auth.ts +++ b/lib/auth.ts @@ -183,6 +183,10 @@ export const authOptions: NextAuthOptions = { // console.log('---', user, 'account', account, 'email', email, 'exist', existingUser) // 顺便过滤掉不允许登录的用户 return !!existingUser && existingUser.allowToLogin; + }, + // 重定向 + async redirect({ url, baseUrl }) { + return baseUrl; } }, }; diff --git a/middleware.ts b/middleware.ts index 8b9e3b83d..1a8c7ff79 100644 --- a/middleware.ts +++ b/middleware.ts @@ -11,7 +11,6 @@ export default async function middleware(req: NextRequest) { const path = `${url.pathname}${ searchParams.length > 0 ? `?${searchParams}` : "" }`; - console.log('----', url) // 直接将/app/下面路由重定向到顶层 if (path.startsWith('/app')) { return NextResponse.redirect(new URL(path.replace('/app', ''), req.url), 301);