🐞 fix: Remove toString on redirectURL

This commit is contained in:
mbaharip
2023-09-11 06:59:15 +07:00
parent d6b280ae02
commit ac61811086
@@ -53,9 +53,9 @@ export async function GET(request: NextRequest, { params }: { params: { encrypte
}
}
const redirectURL = new URL(path.reverse().join("/"), process.env.NEXT_PUBLIC_VERCEL_URL ?? request.nextUrl.origin);
const redirectURL = new URL(path.reverse().join("/"), request.nextUrl.origin ?? process.env.VERCEL_URL);
console.log(redirectURL);
return NextResponse.redirect(redirectURL.toString(), {
return NextResponse.redirect(redirectURL, {
status: 302,
headers: {
"Cache-Control": gIndexConfig.cacheControl,