diff options
author | Sven-Hendrik Haase <svenstaro@gmail.com> | 2024-01-16 14:46:45 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-16 14:46:45 +0000 |
commit | 30addbf66cff10c490ad407f73f5d0f1d0a75db5 (patch) | |
tree | ffddf0c1520049f3bc44e3df7361c197b6dadd6c /src/config.rs | |
parent | Bump deps (diff) | |
parent | Add option for compress response (diff) | |
download | miniserve-30addbf66cff10c490ad407f73f5d0f1d0a75db5.tar.gz miniserve-30addbf66cff10c490ad407f73f5d0f1d0a75db5.zip |
Merge pull request #1315 from zuisong/opt_compress_response
Optional enable compression middleware to reduce response size (disabled by default)
Diffstat (limited to 'src/config.rs')
-rw-r--r-- | src/config.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs index bfe916b..6e4a1eb 100644 --- a/src/config.rs +++ b/src/config.rs @@ -119,6 +119,9 @@ pub struct MiniserveConfig { /// If false, creation of zip archives is disabled pub zip_enabled: bool, + /// Enable compress response + pub compress_response: bool, + /// If enabled, directories are listed first pub dirs_first: bool, @@ -309,6 +312,7 @@ impl MiniserveConfig { show_wget_footer: args.show_wget_footer, readme: args.readme, tls_rustls_config: tls_rustls_server_config, + compress_response: args.compress_response, }) } } |