From f572a386221abe13174cca5f125338301cd2035e Mon Sep 17 00:00:00 2001 From: alemi Date: Tue, 31 Dec 2024 16:30:45 +0100 Subject: [PATCH] chore: rename "prevent.fetch" to "prevent.requests" --- upub/core/src/config.rs | 8 ++++---- upub/routes/src/auth.rs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/upub/core/src/config.rs b/upub/core/src/config.rs index a0a7720..ef30d52 100644 --- a/upub/core/src/config.rs +++ b/upub/core/src/config.rs @@ -168,13 +168,13 @@ pub struct RejectConfig { /// skip delivering to these instances pub delivery: Vec, - #[serde(default)] - /// prevent fetching from these instances (ineffective as they can still fetch without identifying) - pub fetch: Vec, - #[serde(default)] /// prevent fetching private content from these instances pub access: Vec, + + #[serde(default)] + /// reject any request from these instances (ineffective as they can still fetch anonymously) + pub requests: Vec, } impl Config { diff --git a/upub/routes/src/auth.rs b/upub/routes/src/auth.rs index 1136cad..e0e8a93 100644 --- a/upub/routes/src/auth.rs +++ b/upub/routes/src/auth.rs @@ -150,7 +150,7 @@ where return Err(ApiError::unauthorized()); } - if ctx.cfg().reject.fetch.contains(&user.domain) { + if ctx.cfg().reject.requests.contains(&user.domain) { return Err(ApiError::Status(axum::http::StatusCode::UNAVAILABLE_FOR_LEGAL_REASONS)); }