From f1c8a55b7a7ae533236564a195037128804445e6 Mon Sep 17 00:00:00 2001 From: Dean Li Date: Sun, 21 Feb 2021 16:55:17 +0800 Subject: Allow set custom headers from CLI --- src/args.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/args.rs') diff --git a/src/args.rs b/src/args.rs index f736941..53f1638 100644 --- a/src/args.rs +++ b/src/args.rs @@ -117,6 +117,10 @@ struct CliArgs { /// Shown instead of host in page title and heading #[structopt(short = "t", long = "title")] title: Option, + + /// Custom header from user + #[structopt(long = "header")] + header: Option, } /// Checks wether an interface is valid, i.e. it can be parsed into an IP address @@ -225,6 +229,7 @@ pub fn parse_args() -> crate::MiniserveConfig { zip_enabled: args.enable_zip, dirs_first: args.dirs_first, title: args.title, + header: args.header, } } -- cgit v1.2.3