docs: clarify that MAX_PAGES_PER_CHAPTER=0 relies on the body-size backstop
Make explicit (config.rs + .env.example) that disabling the per-chapter page cap leaves MAX_REQUEST_BYTES as the sole bound (audit footgun). No behavior change; the thumbnail-source read is already bounded by MAX_FILE_BYTES + decode limits. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -66,8 +66,10 @@ pub struct UploadConfig {
|
||||
pub max_file_bytes: usize,
|
||||
/// Max page images accepted in one chapter upload. Bounds how many
|
||||
/// parts the handler will stage before giving up, so a client can't
|
||||
/// pin a worker streaming an unbounded page count. `0` disables the
|
||||
/// cap. Defaults to 2000. `MAX_PAGES_PER_CHAPTER`.
|
||||
/// pin a worker streaming an unbounded page count. `0` disables THIS
|
||||
/// cap — the total is then bounded only by `max_request_bytes` (the
|
||||
/// whole-request body limit), which stays the backstop either way.
|
||||
/// Defaults to 2000. `MAX_PAGES_PER_CHAPTER`.
|
||||
pub max_pages_per_chapter: usize,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user