From a5436e7eef605760183379dd13dcd82f423c02d3 Mon Sep 17 00:00:00 2001 From: ahadley1124 Date: Sun, 18 Feb 2024 12:28:09 -0500 Subject: [PATCH] Add ads.txt File Signed-off-by: ahadley1124 --- src/main.rs | 8 +++++++- static/ads.txt | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 static/ads.txt diff --git a/src/main.rs b/src/main.rs index 7aff7eb..b60a55f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -148,6 +148,11 @@ async fn resources() -> Option { NamedFile::open("static/resources.html").await.ok() } +#[get("/ads.txt")] +async fn ads() -> Option { + NamedFile::open("static/ads.txt").await.ok() +} + #[rocket::main] async fn main() { let allowedEmails: Vec = vec![ @@ -160,7 +165,8 @@ async fn main() { .mount( "/", routes![ - index, favicon, events, robots, sitemap, pgp_key, repeaters, contact, resources + index, favicon, events, robots, sitemap, pgp_key, repeaters, contact, resources, + ads ], ) .mount( diff --git a/static/ads.txt b/static/ads.txt new file mode 100644 index 0000000..42ffc6a --- /dev/null +++ b/static/ads.txt @@ -0,0 +1 @@ +google.com, pub-1441040884807072, DIRECT, f08c47fec0942fa0 \ No newline at end of file