File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -155,18 +155,22 @@ impl Server {
155155 if let Some ( index_file) = & directory. index_file {
156156 app = app. service (
157157 Files :: new ( & directory. route , & directory. directory_path )
158+ . method_guard ( guard:: fn_guard ( |_| true ) )
158159 . index_file ( index_file)
159160 . redirect_to_slash_directory ( ) ,
160161 ) ;
161162 } else if directory. show_files_listing {
162163 app = app. service (
163164 Files :: new ( & directory. route , & directory. directory_path )
165+ . method_guard ( guard:: fn_guard ( |_| true ) )
164166 . redirect_to_slash_directory ( )
165167 . show_files_listing ( ) ,
166168 ) ;
167169 } else {
168- app = app
169- . service ( Files :: new ( & directory. route , & directory. directory_path ) ) ;
170+ app = app. service (
171+ Files :: new ( & directory. route , & directory. directory_path )
172+ . method_guard ( guard:: fn_guard ( |_| true ) ) ,
173+ ) ;
170174 }
171175 }
172176
You can’t perform that action at this time.
0 commit comments