Skip to content

Commit 4671926

Browse files
Remove CSRF protection simulation from health check endpoint
Signed-off-by: Shahm Najeeb <Shahm_Najeeb@outlook.com>
1 parent 6731edd commit 4671926

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

app/api/auth/login/route.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -148,17 +148,6 @@ export async function GET(request: NextRequest) {
148148
const rateLimit = checkRateLimit(ip, 5, 15 * 60 * 1000, 30 * 60 * 1000);
149149
console.log("[AUTH DEBUG] Rate limit check:", {allowed: rateLimit.allowed});
150150

151-
// CSRF protection simulation (generate dummy request body)
152-
const csrfCheck = await requireCsrfProtection(request);
153-
if (csrfCheck.error) {
154-
console.log("[AUTH DEBUG] Health check CSRF check failed");
155-
return NextResponse.json(
156-
{status: "error", message: "CSRF protection failed"},
157-
{status: 400, headers: {"Content-Type": "application/json"}}
158-
);
159-
}
160-
console.log("[AUTH DEBUG] Health check CSRF passed");
161-
162151
// Simulate session token creation and cookie setting
163152
const token = await createSessionToken();
164153
await setSessionCookie(token);

0 commit comments

Comments
 (0)