Skip to content

Commit

Permalink
Rework formatting to be actually correct logic
Browse files Browse the repository at this point in the history
  • Loading branch information
kylerchin committed Jun 4, 2024
1 parent f4bd701 commit 043d584
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ async fn robots(req: actix_web::HttpRequest) -> impl actix_web::Responder {

let robots_banned_bots = banned_bots
.into_iter()
.map(|x| format!("User-agent: {}", x))
.map(|x| format!("User-agent: {}\nDisallow: /", x))
.collect::<Vec<String>>()
.join("\nDisallow: /\n\n");
.join("\n\n");

actix_web::HttpResponse::Ok()
.insert_header(("Content-Type", "text/plain"))
Expand Down

0 comments on commit 043d584

Please sign in to comment.