mirror of
https://github.com/fafhrd91/actix-web
synced 2025-06-25 22:49:21 +02:00
fix static files
This commit is contained in:
@ -80,7 +80,8 @@ fn main() {
|
||||
}
|
||||
}))
|
||||
// static files
|
||||
.resource("/static", |r| r.h(fs::StaticFiles::new("examples/static/", true)))
|
||||
.resource("/static/{tail:.*}",
|
||||
|r| r.h(fs::StaticFiles::new("tail", "examples/static/", true)))
|
||||
// redirect
|
||||
.resource("/", |r| r.method(Method::GET).f(|req| {
|
||||
println!("{:?}", req);
|
||||
|
Reference in New Issue
Block a user