diff options
author | metamuffin <metamuffin@disroot.org> | 2024-04-30 01:59:13 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-04-30 01:59:13 +0200 |
commit | fcc558d8e1c6759c19adc81c55bbe6b0a1a0ee35 (patch) | |
tree | 5f13bd3215828ca4e92fcde641abfff8c11bb4aa /src/config.rs | |
parent | f57e6a8e8977d1acdfafeda7b1444cb155730894 (diff) | |
download | gnix-fcc558d8e1c6759c19adc81c55bbe6b0a1a0ee35.tar gnix-fcc558d8e1c6759c19adc81c55bbe6b0a1a0ee35.tar.bz2 gnix-fcc558d8e1c6759c19adc81c55bbe6b0a1a0ee35.tar.zst |
sest cache control header
Diffstat (limited to 'src/config.rs')
-rw-r--r-- | src/config.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs index 700c4ed..e661996 100644 --- a/src/config.rs +++ b/src/config.rs @@ -100,7 +100,19 @@ pub struct FileserverConfig { pub last_modified: bool, #[serde(default = "return_true")] pub etag: bool, + #[serde(default)] + pub cache: CacheConfig, } + +#[derive(Debug, Default, Serialize, Deserialize)] +#[serde(rename_all = "snake_case")] +pub enum CacheConfig { + #[default] + Public, + Private, + NoStore, +} + fn return_true() -> bool { true } |