docs: clean upload documentation

This commit is contained in:
Tom Boullay
2026-05-12 23:48:47 +02:00
parent 498765db61
commit 101af23418
6 changed files with 11 additions and 17 deletions
+1 -2
View File
@@ -2,8 +2,7 @@ import { timingSafeEqual } from 'crypto'
import { NextRequest, NextResponse } from 'next/server'
/**
* Validate the upload secret from request headers.
* Returns null if valid, or a NextResponse error if invalid.
* Validate the shared upload secret before accepting mutation routes.
*/
export function validateUploadSecret(req: NextRequest): NextResponse | null {
const secret = req.headers.get('x-upload-secret')