chore: rename "prevent.fetch" to "prevent.requests"

This commit is contained in:
əlemi 2024-12-31 16:30:45 +01:00
parent 6499e5f7ea
commit f572a38622
Signed by: alemi
GPG key ID: A4895B84D311642C
2 changed files with 5 additions and 5 deletions

View file

@ -168,13 +168,13 @@ pub struct RejectConfig {
/// skip delivering to these instances
pub delivery: Vec<String>,
#[serde(default)]
/// prevent fetching from these instances (ineffective as they can still fetch without identifying)
pub fetch: Vec<String>,
#[serde(default)]
/// prevent fetching private content from these instances
pub access: Vec<String>,
#[serde(default)]
/// reject any request from these instances (ineffective as they can still fetch anonymously)
pub requests: Vec<String>,
}
impl Config {

View file

@ -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));
}