Skip to content

Commit

Permalink
update conditional (#3446)
Browse files Browse the repository at this point in the history
  • Loading branch information
pablonyx authored Dec 12, 2024
1 parent d23fca9 commit a951620
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion web/src/app/api/[...path]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit a951620

Please sign in to comment.