Merge pull request #3432 from onyx-dot-app/vercel_preview

Enable Vercel Preview
This commit is contained in:
pablonyx
2024-12-11 18:55:14 -08:00
committed by GitHub

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 !== "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"
) {
return NextResponse.json(
{
message: