Skip to content

import { NextResponse } from 'next/server' import type { NextRequest } from 'next/server' // ID PROJET: gen-lang-client-0091228222 // Responsable: Rubén Espinar (+33 6 99 46 94 79) export function middleware(request: NextRequest) { const isPaid = process.env.LICENSE_PAID === 'true'; // Configurable en Vercel const { pathname } = request.nextUrl; // Rutas públicas permitidas (Muro de Pago y Contrato) if (pathname.startsWith('/payment-terminal') || pathname.startsWith('/_next') || pathname.startsWith('/static')) { return NextResponse.next(); } // Si la licencia no está pagada (FALSE), bloqueo total y redirección if (!isPaid) { return NextResponse.redirect(new URL('/payment-terminal', request.url)); } return NextResponse.next(); } export const config = { matcher: ['/((?!api|_next/static|_next/image|favicon.ico).*)'], }; #3

@LVT-ENG

Description

@LVT-ENG
No description provided.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions