aboutsummaryrefslogtreecommitdiffstats
path: root/src/config.rs
diff options
context:
space:
mode:
authorSven-Hendrik Haase <svenstaro@gmail.com>2023-08-07 13:46:03 +0000
committerGitHub <noreply@github.com>2023-08-07 13:46:03 +0000
commite3c0abb309ca8b2995072e541a9b7c6a8790fe8f (patch)
treec238f73a08f05f284e36ad5ed8721d7aa3fb0c82 /src/config.rs
parentMerge pull request #1192 from svenstaro/dependabot/cargo/serde-1.0.181 (diff)
parentAdjust from feedback (diff)
downloadminiserve-e3c0abb309ca8b2995072e541a9b7c6a8790fe8f.tar.gz
miniserve-e3c0abb309ca8b2995072e541a9b7c6a8790fe8f.zip
Merge pull request #1193 from nlopes/nlopes-pretty-urls
Add pretty urls
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs
index 8976d35..2df9fdd 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -80,6 +80,13 @@ pub struct MiniserveConfig {
/// allow the SPA router to handle the request instead.
pub spa: bool,
+ /// Activate Pretty URLs mode
+ ///
+ /// This will cause the server to serve the equivalent `.html` file indicated by the path.
+ ///
+ /// `/about` will try to find `about.html` and serve it.
+ pub pretty_urls: bool,
+
/// Enable QR code display
pub show_qrcode: bool,
@@ -250,6 +257,7 @@ impl MiniserveConfig {
default_color_scheme_dark,
index: args.index,
spa: args.spa,
+ pretty_urls: args.pretty_urls,
overwrite_files: args.overwrite_files,
show_qrcode: args.qrcode,
mkdir_enabled: args.mkdir_enabled,