feat: endpoint webhook Clientify para sync en tiempo real

URL pública por tenant (?tenant=slug) para contactos y oportunidades;
middleware permite POST sin sesión.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
4Ventures
2026-09-23 15:40:41 +02:00
parent 76c26c2e69
commit f436276c3e
2 changed files with 283 additions and 1 deletions

View File

@@ -52,10 +52,11 @@ export async function middleware(req: NextRequest) {
const url = req.nextUrl.clone();
const path = url.pathname;
// Public: login, attribution script, health
// Public: login, attribution script, health, inbound webhooks (CRM)
const isPublic =
path === '/login' ||
path === '/api/health' ||
path.startsWith('/api/webhooks/') ||
path === '/_4v_attr.js' ||
path.startsWith('/_next') ||
path === '/favicon.ico' ||