Skip to content

Commit

Permalink
Add ads.txt File
Browse files Browse the repository at this point in the history
Signed-off-by: ahadley1124 <[email protected]>
  • Loading branch information
ahadley1124 committed Feb 18, 2024
1 parent a2750c9 commit a5436e7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,11 @@ async fn resources() -> Option<NamedFile> {
NamedFile::open("static/resources.html").await.ok()
}

#[get("/ads.txt")]
async fn ads() -> Option<NamedFile> {
NamedFile::open("static/ads.txt").await.ok()
}

#[rocket::main]
async fn main() {
let allowedEmails: Vec<String> = vec![
Expand All @@ -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(
Expand Down
1 change: 1 addition & 0 deletions static/ads.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
google.com, pub-1441040884807072, DIRECT, f08c47fec0942fa0

0 comments on commit a5436e7

Please sign in to comment.