Skip to content

Commit

Permalink
fix axum
Browse files Browse the repository at this point in the history
  • Loading branch information
aschey committed Jan 19, 2025
1 parent f33e25d commit 443934c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions platuned/server/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,10 @@ async fn run_file_service(
match &folders[..] {
[] => {}
[folder] => {
app = app.nest_service(root_path, ServeDir::new(folder));
app = app.fallback_service(ServeDir::new(folder));
}
[folder, fallback] => {
app = app.nest_service(
root_path,
ServeDir::new(folder).fallback(ServeDir::new(fallback)),
);
app = app.fallback_service(ServeDir::new(folder).fallback(ServeDir::new(fallback)));
}
[first, second, rest @ ..] => {
let mut serve_dir = ServeDir::new(first).fallback(ServeDir::new(second));
Expand Down

0 comments on commit 443934c

Please sign in to comment.