aboutsummaryrefslogtreecommitdiff
path: root/src/config.rs
diff options
context:
space:
mode:
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
}