From b33bf8dbd7753407c54fa0c13f5069d6871ccf26 Mon Sep 17 00:00:00 2001 From: TheGeneralist <180094941+thegeneralist01@users.noreply.github.com> Date: Sun, 19 Jul 2026 12:09:37 +0200 Subject: [PATCH] feat(server): expose via_freedium in capture API (default on) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CaptureBody gains via_freedium: Option; absent defaults to true. The rearchive handler sets it to false — existing entries should not be silently re-fetched through a mirror. --- crates/archivr-server/src/routes.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/archivr-server/src/routes.rs b/crates/archivr-server/src/routes.rs index 3388a05..9df6c52 100644 --- a/crates/archivr-server/src/routes.rs +++ b/crates/archivr-server/src/routes.rs @@ -747,6 +747,8 @@ struct CaptureBody { reader_mode: Option, cookie_ext_enabled: Option, modal_closer_enabled: Option, + /// Route through Freedium mirror for WebPage captures. Absent = true (on by default). + via_freedium: Option, } #[derive(Debug, serde::Deserialize)] @@ -860,6 +862,7 @@ async fn capture_handler( cookie_ext_enabled: Some(effective_cookie_ext), modal_closer_enabled: Some(effective_modal_closer), reader_mode: body.reader_mode.unwrap_or(false), + via_freedium: body.via_freedium.unwrap_or(true), }; // Spawn background capture. @@ -977,6 +980,7 @@ async fn rearchive_handler( cookie_ext_enabled: None, modal_closer_enabled: None, reader_mode: false, + via_freedium: false, }; let job_uid_bg = job_uid.clone();