chore: improve html-router auth, caching, and analytics while centralizing search labels in common.

small fix
This commit is contained in:
Per Stark
2026-05-29 14:42:20 +02:00
parent 920d7b5efb
commit ec80a4e540
27 changed files with 510 additions and 344 deletions
+4 -1
View File
@@ -29,7 +29,10 @@ pub fn validate_ingest_input(
category: &str,
file_count: usize,
) -> Result<(), IngestValidationError> {
let text_field_bytes = content.map(str::len).unwrap_or(0) + ctx.len() + category.len();
let content_bytes = content.map_or(0, str::len);
let text_field_bytes = content_bytes
.saturating_add(ctx.len())
.saturating_add(category.len());
if text_field_bytes > config.ingest_max_body_bytes {
return Err(IngestValidationError::PayloadTooLarge(format!(
"request text fields exceed maximum allowed body size of {} bytes",