add: littleweb base
This commit is contained in:
parent
07a23f505b
commit
c4de17058b
20 changed files with 457 additions and 8 deletions
|
@ -252,6 +252,10 @@ pub struct Config {
|
|||
/// so this host should be included in there as well.
|
||||
#[serde(default = "default_host")]
|
||||
pub host: String,
|
||||
/// The main public host of the littleweb server. **Not** used to check against banned hosts,
|
||||
/// so this host should be included in there as well.
|
||||
#[serde(default = "default_lw_host")]
|
||||
pub lw_host: String,
|
||||
/// Database security.
|
||||
#[serde(default = "default_security")]
|
||||
pub security: SecurityConfig,
|
||||
|
@ -319,6 +323,10 @@ fn default_host() -> String {
|
|||
String::new()
|
||||
}
|
||||
|
||||
fn default_lw_host() -> String {
|
||||
String::new()
|
||||
}
|
||||
|
||||
fn default_security() -> SecurityConfig {
|
||||
SecurityConfig::default()
|
||||
}
|
||||
|
@ -385,6 +393,7 @@ impl Default for Config {
|
|||
port: default_port(),
|
||||
banned_hosts: default_banned_hosts(),
|
||||
host: default_host(),
|
||||
lw_host: default_lw_host(),
|
||||
database: default_database(),
|
||||
security: default_security(),
|
||||
dirs: default_dirs(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue