P1-2: Add onRequest auth hook to reject anonymous requests on all 7 VoicePrint endpoints. Previously, the auth middleware always attached a placeholder user (id='anonymous'), so per-route userId checks passed for unauthenticated clients. P1-3: Replace JSON body parsing with @fastify/multipart for POST /endpoints (/enroll, /analyze, /batch). Fastify JSON parser cannot produce Buffer from request.body; multipart/form-data is required for audio file uploads. Added 50MB file size limit.
859 B
859 B