WIP
This commit is contained in:
parent
d851dbbea6
commit
ca392ed20c
1 changed files with 28 additions and 0 deletions
|
@ -27,6 +27,8 @@ pub struct Config {
|
|||
pub id: Option<Id>,
|
||||
#[validate(nested)]
|
||||
pub file: Option<File>,
|
||||
#[validate(nested)]
|
||||
pub security: Option<Security>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Serialize, Validate, Debug)]
|
||||
|
@ -129,3 +131,29 @@ pub struct File {
|
|||
pub proxy_remote_file: Option<bool>,
|
||||
pub cache_remote_file: Option<bool>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Serialize, Validate, Debug)]
|
||||
pub struct Security {
|
||||
pub require_authorized_fetch: Option<bool>,
|
||||
pub private_mode: Option<bool>,
|
||||
#[validate(nested)]
|
||||
pub captcha: Option<CaptchaConfig>,
|
||||
pub enable_strict_email_check: Option<bool>,
|
||||
pub log_ip_address: Option<bool>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Serialize, Validate, Debug)]
|
||||
pub struct CaptchaConfig {
|
||||
pub enabled: bool,
|
||||
pub kind: Captcha,
|
||||
pub site_key: String,
|
||||
pub secret_key: String,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Serialize, Debug)]
|
||||
pub enum Captcha {
|
||||
#[serde(rename = "hCaptcha")]
|
||||
HCaptcha,
|
||||
#[serde(rename = "reCAPTCHA")]
|
||||
ReCaptcha,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue