修正钉钉入口公网跳转地址
This commit is contained in:
parent
05efe45050
commit
67086c684b
@ -4,6 +4,7 @@ import {
|
||||
getAuthSessionCookieCandidates,
|
||||
resolveSecureAuthCookieFromRequest,
|
||||
} from '@/lib/auth-cookie'
|
||||
import { getPublicAppOrigin } from '@/lib/public-app-url'
|
||||
import { buildDingtalkAutoLoginPath, normalizeInternalRedirectPath } from '@/lib/safe-redirect'
|
||||
|
||||
async function resolveCurrentToken(request: NextRequest) {
|
||||
@ -29,5 +30,5 @@ export async function GET(request: NextRequest) {
|
||||
const token = await resolveCurrentToken(request)
|
||||
const nextPath = token ? redirectPath : buildDingtalkAutoLoginPath(redirectPath)
|
||||
|
||||
return NextResponse.redirect(new URL(nextPath, request.url))
|
||||
return NextResponse.redirect(new URL(nextPath, getPublicAppOrigin()))
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user