aboutsummaryrefslogtreecommitdiffstats
path: root/src/args.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/args.rs')
-rw-r--r--src/args.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/args.rs b/src/args.rs
index cc8b0f1..25f2915 100644
--- a/src/args.rs
+++ b/src/args.rs
@@ -214,6 +214,18 @@ pub struct CliArgs {
#[arg(short = 'z', long = "enable-zip", env = "MINISERVE_ENABLE_ZIP")]
pub enable_zip: bool,
+ /// Enable compress response
+ ///
+ /// WARNING: Enabling this option may slow down transfers due to CPU overhead, so it is disabled by default.
+ ///
+ /// Only enable this option if you know that your users have slow connections or if you want to minimize your server's bandwidth usage.
+ #[arg(
+ short = 'C',
+ long = "compress-response",
+ env = "MINISERVE_COMPRESS_RESPONSE"
+ )]
+ pub compress_response: bool,
+
/// List directories first
#[arg(short = 'D', long = "dirs-first", env = "MINISERVE_DIRS_FIRST")]
pub dirs_first: bool,