chore: rename "prevent.fetch" to "prevent.requests"
This commit is contained in:
parent
6499e5f7ea
commit
f572a38622
2 changed files with 5 additions and 5 deletions
|
@ -168,13 +168,13 @@ pub struct RejectConfig {
|
||||||
/// skip delivering to these instances
|
/// skip delivering to these instances
|
||||||
pub delivery: Vec<String>,
|
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)]
|
#[serde(default)]
|
||||||
/// prevent fetching private content from these instances
|
/// prevent fetching private content from these instances
|
||||||
pub access: Vec<String>,
|
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 {
|
impl Config {
|
||||||
|
|
|
@ -150,7 +150,7 @@ where
|
||||||
return Err(ApiError::unauthorized());
|
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));
|
return Err(ApiError::Status(axum::http::StatusCode::UNAVAILABLE_FOR_LEGAL_REASONS));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue