feat: implement R4 production hardening

- Add configurable ingestion batch item limits
- Improve client serialization and sanitization
- Add graceful handling for corrupt GZIP partitions in data API
- Expand admin session token scope
- Update project documentation for R4 status
This commit is contained in:
Team Dark Devil committed 2026-11-21 22:15:32 +06:00
1 parent 8132087085
commit ae9b554189
59 files changed
+16879 -1074

No files matched your search

+5 -1
View File
@@ -71,6 +71,10 @@ export async function POST(req: NextRequest) {
const result = await testS3Connection(config);
if (!result.ok) {
const isClientError =
result.code === "S3_INVALID_CONFIG" ||
result.code === "SSRF_BLOCKED_HOST" ||
result.code === "INVALID_URL";
return NextResponse.json(
{
success: false,
@@ -78,7 +82,7 @@ export async function POST(req: NextRequest) {
error: result.error || "S3 connectivity check failed.",
...(result.status !== undefined ? { s3Status: result.status } : {}),
},
{ status: result.code === "S3_INVALID_CONFIG" ? 400 : 502 },
{ status: isClientError ? 400 : 502 },
);
}