From 7de3534212ec3873d14440c68c24415bcf32bd10 Mon Sep 17 00:00:00 2001 From: Richard Kuo Date: Wed, 11 Dec 2024 22:21:07 -0800 Subject: [PATCH] cherry pick handleRequest fix --- web/src/app/api/[...path]/route.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/web/src/app/api/[...path]/route.ts b/web/src/app/api/[...path]/route.ts index 42809d43b85..0ebd8210a81 100644 --- a/web/src/app/api/[...path]/route.ts +++ b/web/src/app/api/[...path]/route.ts @@ -61,12 +61,7 @@ export async function OPTIONS( } async function handleRequest(request: NextRequest, path: string[]) { - if ( - process.env.NODE_ENV !== "production" && - // NOTE: Set this environment variable to 'true' for preview environments - // Where you want finer-grained control over API access - process.env.OVERRIDE_API_PRODUCTION !== "true" - ) { + if (process.env.NODE_ENV !== "development") { return NextResponse.json( { message: