mirror of
https://github.com/ntex-rs/ntex.git
synced 2025-04-05 13:57:39 +03:00
fix static files
This commit is contained in:
parent
774bfc0a86
commit
3e91b06241
5 changed files with 35 additions and 16 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue