update conditional (#3446)

This commit is contained in:
pablonyx 2024-12-12 09:07:30 -08:00 committed by GitHub
parent d23fca96c4
commit a9516202fe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -61,7 +61,12 @@ export async function OPTIONS(
}
async function handleRequest(request: NextRequest, path: string[]) {
if (process.env.NODE_ENV !== "development") {
if (
process.env.NODE_ENV !== "development" &&
// 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"
) {
return NextResponse.json(
{
message: