Fix logout redirect to 0.0.0.0 instead of configured BASE_URL
Closes #113 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { NextRequest, NextResponse } from "next/server";
|
||||
import { getAuth } from "@/src/lib/auth-server";
|
||||
import { checkSameOrigin } from "@/src/lib/auth";
|
||||
import { config } from "@/src/lib/config";
|
||||
import { headers } from "next/headers";
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
@@ -10,5 +11,5 @@ export async function POST(request: NextRequest) {
|
||||
if (originCheck) return originCheck;
|
||||
|
||||
await getAuth().api.signOut({ headers: await headers() });
|
||||
return NextResponse.redirect(new URL("/login", request.url));
|
||||
return NextResponse.redirect(new URL("/login", config.baseUrl));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user