aboutsummaryrefslogtreecommitdiff
path: root/src/config.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs
index bc4369d..700c4ed 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -96,6 +96,13 @@ pub struct FileserverConfig {
pub root: PathBuf,
#[serde(default)]
pub index: bool,
+ #[serde(default = "return_true")]
+ pub last_modified: bool,
+ #[serde(default = "return_true")]
+ pub etag: bool,
+}
+fn return_true() -> bool {
+ true
}
// try deser Vec<T> but fall back to deser T and putting that in Vec