This commit is contained in:
pablodanswer
2024-12-11 13:36:10 -08:00
parent 5d810d373e
commit d7f8cf8f18

View File

@@ -61,15 +61,15 @@ export async function OPTIONS(
} }
async function handleRequest(request: NextRequest, path: string[]) { async function handleRequest(request: NextRequest, path: string[]) {
if (process.env.NODE_ENV === "production") { // if (process.env.NODE_ENV === "production") {
return NextResponse.json( // return NextResponse.json(
{ // {
message: // message:
"This API is only available in development or preview mode. In production, something else (e.g. nginx) should handle this.", // "This API is only available in development or preview mode. In production, something else (e.g. nginx) should handle this.",
}, // },
{ status: 404 } // { status: 404 }
); // );
} // }
try { try {
const backendUrl = new URL(`${INTERNAL_URL}/${path.join("/")}`); const backendUrl = new URL(`${INTERNAL_URL}/${path.join("/")}`);