diff --git a/app/api/family/session/route.ts b/app/api/family/session/route.ts index d55dba9..6abec88 100644 --- a/app/api/family/session/route.ts +++ b/app/api/family/session/route.ts @@ -20,7 +20,12 @@ export async function GET(request: NextRequest) { request.nextUrl.searchParams.get("redirectTo"), ); const existingCaregiver = await getCaregiverSession(); - const response = NextResponse.redirect(new URL(redirectTo, request.url)); + const response = new NextResponse(null, { + status: 307, + headers: { + Location: redirectTo, + }, + }); if (existingCaregiver) { return response;