aboutsummaryrefslogtreecommitdiff
path: root/src/config.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-04-30 01:48:46 +0200
committermetamuffin <metamuffin@disroot.org>2024-04-30 01:48:46 +0200
commitf57e6a8e8977d1acdfafeda7b1444cb155730894 (patch)
treee5f076c02d5760a5ba9e3a34e8d70d8cc0044179 /src/config.rs
parent398551e20f28c136d9e3be2ccb33e31ffe50cb91 (diff)
downloadgnix-f57e6a8e8977d1acdfafeda7b1444cb155730894.tar
gnix-f57e6a8e8977d1acdfafeda7b1444cb155730894.tar.bz2
gnix-f57e6a8e8977d1acdfafeda7b1444cb155730894.tar.zst
implement if-not-modified
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