disable index on static/ file server
This commit is contained in:
parent
28c01a7fc6
commit
9c3a016c82
@ -2,6 +2,7 @@
|
|||||||
extern crate rocket;
|
extern crate rocket;
|
||||||
|
|
||||||
use rocket::fs::FileServer;
|
use rocket::fs::FileServer;
|
||||||
|
use rocket::fs::Options;
|
||||||
use rocket::response::Redirect;
|
use rocket::response::Redirect;
|
||||||
use rocket::State;
|
use rocket::State;
|
||||||
use rocket_dyn_templates::tera;
|
use rocket_dyn_templates::tera;
|
||||||
@ -192,6 +193,6 @@ async fn rocket() -> _ {
|
|||||||
routes![index, show_question, show_answer, question0, answer0],
|
routes![index, show_question, show_answer, question0, answer0],
|
||||||
)
|
)
|
||||||
.mount("/q", routes![index])
|
.mount("/q", routes![index])
|
||||||
.mount("/q/static", FileServer::from("static/"))
|
.mount("/q/static", FileServer::new("static/", Options::None))
|
||||||
.attach(Template::fairing())
|
.attach(Template::fairing())
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user