Browse Source

Add a robots.txt because why not

Signed-off-by: Amelia Aronsohn <WagThatTail@Me.com>
master
Amelia A 2 years ago
parent
commit
9420c6d811
Signed by: amy GPG Key ID: 70C320ABA95D38C1
  1. 6
      src/main.rs

6
src/main.rs

@ -75,10 +75,16 @@ fn draw_card(state: State<SharedCardList>) -> Result<Template, Status> {
}
}
#[get("/")]
fn robots_txt() -> &'static str {
"User-agent: *\nDisallow: /"
}
fn rocket() -> rocket::Rocket {
rocket::ignite()
.mount("/", routes![draw_card])
.mount(CARD_URI, StaticFiles::from(CARD_DIRECTORY))
.mount("/robots.txt", routes![robots_txt])
.attach(Template::fairing())
}

Loading…
Cancel
Save