disable index on static/ file server

This commit is contained in:
Dmitry Belyaev 2023-08-20 12:11:09 +03:00
parent 28c01a7fc6
commit 9c3a016c82
Signed by: b4tman
GPG Key ID: 41A00BF15EA7E5F3

View File

@ -2,6 +2,7 @@
extern crate rocket;
use rocket::fs::FileServer;
use rocket::fs::Options;
use rocket::response::Redirect;
use rocket::State;
use rocket_dyn_templates::tera;
@ -192,6 +193,6 @@ async fn rocket() -> _ {
routes![index, show_question, show_answer, question0, answer0],
)
.mount("/q", routes![index])
.mount("/q/static", FileServer::from("static/"))
.mount("/q/static", FileServer::new("static/", Options::None))
.attach(Template::fairing())
}