aboutsummaryrefslogtreecommitdiff
path: root/src/config.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-04-30 01:59:13 +0200
committermetamuffin <metamuffin@disroot.org>2024-04-30 01:59:13 +0200
commitfcc558d8e1c6759c19adc81c55bbe6b0a1a0ee35 (patch)
tree5f13bd3215828ca4e92fcde641abfff8c11bb4aa /src/config.rs
parentf57e6a8e8977d1acdfafeda7b1444cb155730894 (diff)
downloadgnix-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.rs12
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
}