aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authororwithout <he.haifeng@hotmail.com>2024-04-26 10:00:23 +0000
committerGitHub <noreply@github.com>2024-04-26 10:00:23 +0000
commitc85d9e316fc8e3cc1505126014690537ca2637ec (patch)
tree0e3a674d82816045365e3b7e941cf44ed3ef3a35 /src
parentBump deps (diff)
downloadminiserve-c85d9e316fc8e3cc1505126014690537ca2637ec.tar.gz
miniserve-c85d9e316fc8e3cc1505126014690537ca2637ec.zip
Improve documentation for the --header parameter (#1389)
* Improve documentation for the --header parameter * Add Support for HSTS to Enhance HTTPS Security --------- Co-authored-by: orwithout <googoldecibel@gmail.com>
Diffstat (limited to '')
-rw-r--r--src/args.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/args.rs b/src/args.rs
index 3fb0ede..95c8bff 100644
--- a/src/args.rs
+++ b/src/args.rs
@@ -235,7 +235,12 @@ pub struct CliArgs {
#[arg(short = 't', long = "title", env = "MINISERVE_TITLE")]
pub title: Option<String>,
- /// Set custom header for responses
+ /// Inserts custom headers into the responses. Specify each header as a 'Header:Value' pair.
+ /// This parameter can be used multiple times to add multiple headers.
+ ///
+ /// Example:
+ /// --header "Header1:Value1" --header "Header2:Value2"
+ /// (If a header is already set or previously inserted, it will not be overwritten.)
#[arg(
long = "header",
value_parser(parse_header),