aboutsummaryrefslogtreecommitdiffstats
path: root/src/config.rs
diff options
context:
space:
mode:
authorSven-Hendrik Haase <svenstaro@gmail.com>2024-02-01 03:45:13 +0000
committerGitHub <noreply@github.com>2024-02-01 03:45:13 +0000
commit85bbe590aa331b3157462798544afab65fa888fc (patch)
tree20e9031117381c967cb8e8db31553c607699aed4 /src/config.rs
parentMerge pull request #1331 from cyqsimon/error-refactor (diff)
parenttweak doc comment (diff)
downloadminiserve-85bbe590aa331b3157462798544afab65fa888fc.tar.gz
miniserve-85bbe590aa331b3157462798544afab65fa888fc.zip
Merge pull request #1329 from dyc3/disable-indexing
add `--disable-indexing` cli flag to completely disable directory indexing
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs
index 43414b2..3643502 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -146,6 +146,9 @@ pub struct MiniserveConfig {
/// If enabled, render the readme from the current directory
pub readme: bool,
+ /// If enabled, indexing is disabled.
+ pub disable_indexing: bool,
+
/// If set, use provided rustls config for TLS
#[cfg(feature = "tls")]
pub tls_rustls_config: Option<rustls::ServerConfig>,
@@ -311,6 +314,7 @@ impl MiniserveConfig {
hide_theme_selector: args.hide_theme_selector,
show_wget_footer: args.show_wget_footer,
readme: args.readme,
+ disable_indexing: args.disable_indexing,
tls_rustls_config: tls_rustls_server_config,
compress_response: args.compress_response,
})