feat(creatives): task 2 - integrations auth and visibility scope with sanitization

This commit is contained in:
Marcos Fargas
2026-10-12 13:13:46 +02:00
parent f08bcf2bb8
commit 62d1f3a5f6
4 changed files with 326 additions and 1 deletions

View File

@@ -59,12 +59,13 @@ export async function middleware(req: NextRequest) {
const url = req.nextUrl.clone();
const path = url.pathname;
// Public: login, attribution script, health, inbound webhooks (CRM), cron (Bearer CRON_SECRET)
// Public: login, attribution script, health, inbound webhooks (CRM), cron (Bearer CRON_SECRET), integrations (API Key)
const isPublic =
path === '/login' ||
path === '/api/health' ||
path.startsWith('/api/webhooks/') ||
path.startsWith('/api/cron/') ||
path.startsWith('/api/integrations/') ||
path === '/_4v_attr.js' ||
path.startsWith('/_next') ||
path === '/favicon.ico' ||