updates google login

This commit is contained in:
Zixin Zhou 2025-09-20 21:40:24 +08:00
parent d729ee0e2c
commit fe47bd2c18

View File

@ -50,15 +50,15 @@ const nextConfig = {
const AUTH_API_URL = process.env.NEXT_PUBLIC_JAVA_URL const AUTH_API_URL = process.env.NEXT_PUBLIC_JAVA_URL
// const BASE_URL = 'http://192.168.120.5:8000' // const BASE_URL = 'http://192.168.120.5:8000'
return [ return [
// Google OAuth2 回调代理 // Google OAuth2 API代理 (排除callback让Next.js本地处理)
{ {
source: '/api/auth/google/:path*', source: '/api/auth/google/((?!callback).*)',
destination: `${AUTH_API_URL}/api/auth/google/:path*`, destination: `${AUTH_API_URL}/api/auth/google/$1`,
}, },
// 其他认证相关API代理 // 其他认证相关API代理 (排除google路径)
{ {
source: '/api/auth/:path*', source: '/api/auth/((?!google).)*',
destination: `${AUTH_API_URL}/api/auth/:path*`, destination: `${AUTH_API_URL}/api/auth/$1`,
}, },
{ {
source: '/api/user/:path*', source: '/api/user/:path*',