config option to check root domain with URL previews
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
54ade97f96
commit
244c1f7190
5 changed files with 60 additions and 12 deletions
|
@ -142,6 +142,8 @@ pub struct Config {
|
|||
pub url_preview_url_contains_allowlist: Vec<String>,
|
||||
#[serde(default = "default_url_preview_max_spider_size")]
|
||||
pub url_preview_max_spider_size: usize,
|
||||
#[serde(default)]
|
||||
pub url_preview_check_root_domain: bool,
|
||||
|
||||
#[serde(default = "RegexSet::empty")]
|
||||
#[serde(with = "serde_regex")]
|
||||
|
@ -374,6 +376,10 @@ impl fmt::Display for Config {
|
|||
"URL preview maximum spider size",
|
||||
&self.url_preview_max_spider_size.to_string(),
|
||||
),
|
||||
(
|
||||
"URL preview check root domain",
|
||||
&self.url_preview_check_root_domain.to_string(),
|
||||
),
|
||||
];
|
||||
|
||||
let mut msg: String = "Active config values:\n\n".to_owned();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue