don't send requests to specified list of IP CIDRs
this can most definitely be improved but this is a decent attempt. the only annoying this is i couldn't just use a Vec<IPAddress> which would have significantly simplified all of this, but serde can't deserialise it on the config side i guess. i may find a better way to do this in the future, but this should cover most areas anyways. Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
71d247232d
commit
fa0c083555
8 changed files with 186 additions and 3 deletions
|
@ -427,6 +427,10 @@ impl Service<'_> {
|
|||
&self.config.prevent_media_downloads_from
|
||||
}
|
||||
|
||||
pub fn ip_range_denylist(&self) -> &[String] {
|
||||
&self.config.ip_range_denylist
|
||||
}
|
||||
|
||||
pub fn supported_room_versions(&self) -> Vec<RoomVersionId> {
|
||||
let mut room_versions: Vec<RoomVersionId> = vec![];
|
||||
room_versions.extend(self.stable_room_versions.clone());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue