aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index 5e6f2c8..e4f48f8 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -290,9 +290,12 @@ fn configure_app(app: &mut web::ServiceConfig, conf: &MiniserveConfig) {
let dir_service = || {
let mut files = actix_files::Files::new("", &conf.path);
+ // Use specific index file if one was provided.
if let Some(ref index_file) = conf.index {
files = files.index_file(index_file.to_string_lossy());
- // --spa requires --index in clap
+ // Handle SPA option.
+ //
+ // Note: --spa requires --index in clap.
if conf.spa {
files = files.default_handler(
NamedFile::open(&conf.path.join(index_file))