diff options
author | metamuffin <metamuffin@disroot.org> | 2024-04-30 01:48:46 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-04-30 01:48:46 +0200 |
commit | f57e6a8e8977d1acdfafeda7b1444cb155730894 (patch) | |
tree | e5f076c02d5760a5ba9e3a34e8d70d8cc0044179 /src/config.rs | |
parent | 398551e20f28c136d9e3be2ccb33e31ffe50cb91 (diff) | |
download | gnix-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.rs | 7 |
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 |