mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-19 00:31:24 +01:00
Merge branch 'rate-limiting' into 'main'
Draft: Rate limiting See merge request matrix/grapevine!183
This commit is contained in:
commit
612a5b51cc
8 changed files with 631 additions and 9 deletions
|
|
@ -1,6 +1,6 @@
|
|||
use std::{
|
||||
borrow::Cow,
|
||||
collections::{BTreeMap, HashSet},
|
||||
collections::{BTreeMap, HashMap, HashSet},
|
||||
fmt::{self, Display},
|
||||
net::{IpAddr, Ipv4Addr},
|
||||
path::{Path, PathBuf},
|
||||
|
|
@ -19,6 +19,7 @@ use crate::{error, utils::partial_canonicalize};
|
|||
|
||||
mod env_filter_clone;
|
||||
mod proxy;
|
||||
pub(crate) mod rate_limiting;
|
||||
|
||||
pub(crate) use env_filter_clone::EnvFilterClone;
|
||||
use proxy::ProxyConfig;
|
||||
|
|
@ -69,6 +70,9 @@ pub(crate) struct Config {
|
|||
pub(crate) observability: ObservabilityConfig,
|
||||
#[serde(default)]
|
||||
pub(crate) turn: TurnConfig,
|
||||
#[serde(default = "rate_limiting::default_rate_limit")]
|
||||
pub(crate) rate_limiting:
|
||||
HashMap<rate_limiting::Endpoint, rate_limiting::Config>,
|
||||
|
||||
pub(crate) emergency_password: Option<String>,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue