mirror of https://github.com/fafhrd91/actix-web
the actual change
This commit is contained in:
parent
11b56d6c6f
commit
53967b6718
|
@ -129,6 +129,7 @@ impl Service<ServiceRequest> for FilesService {
|
||||||
match self.index {
|
match self.index {
|
||||||
Some(ref index) => match NamedFile::open(path.join(index)) {
|
Some(ref index) => match NamedFile::open(path.join(index)) {
|
||||||
Ok(named_file) => serve_named_file(req, named_file),
|
Ok(named_file) => serve_named_file(req, named_file),
|
||||||
|
Err(_) if self.show_index => show_index(req),
|
||||||
Err(err) => self.handle_err(err, req),
|
Err(err) => self.handle_err(err, req),
|
||||||
},
|
},
|
||||||
None if self.show_index => show_index(req),
|
None if self.show_index => show_index(req),
|
||||||
|
|
Loading…
Reference in New Issue