Skip to content

[WIP] Update middleware for payment license verification#318

Draft
Copilot wants to merge 1 commit intomainfrom
copilot/gen-lang-client-0091228222-update-middleware
Draft

[WIP] Update middleware for payment license verification#318
Copilot wants to merge 1 commit intomainfrom
copilot/gen-lang-client-0091228222-update-middleware

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 4, 2026

Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.


This section details on the original issue you should resolve

<issue_title>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).*)'], };</issue_title>
<issue_description></issue_description>

Comments on the Issue (you are @copilot in this section)

@vercel
Copy link
Copy Markdown

vercel Bot commented May 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
tryonyou-app Ready Ready Preview, Comment May 4, 2026 8:45am
tryonyou-pilot Ready Ready Preview, Comment May 4, 2026 8:45am

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment