Skip to content

Commit

Permalink
Update the Security.txt file and add some missing routes
Browse files Browse the repository at this point in the history
Signed-off-by: Austin Hadley <[email protected]>
  • Loading branch information
ahadley1124 committed Feb 16, 2024
1 parent 57e6773 commit 36cb1dd
Show file tree
Hide file tree
Showing 5 changed files with 94 additions and 7 deletions.
25 changes: 23 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,36 @@ async fn google_callback(token: TokenResponse<Google>, cookies: &CookieJar<'_>)
Redirect::to("/events")
}

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

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

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

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

#[rocket::main]
async fn main() {
let mut allowedEmails: Vec<String> = vec!["[email protected]".to_string(), "[email protected]".to_string(), "[email protected]".to_string()];
let allowedEmails: Vec<String> = vec!["[email protected]".to_string(), "[email protected]".to_string(), "[email protected]".to_string()];

let _ = rocket::build()
.mount("/", routes![index, favicon, events])
.mount("/", routes![index, favicon, events, robots, sitemap, pgp_key])
.mount("/css/", routes![styles, events_css, auth_css])
.mount("/js/", routes![main_js, navbar_js, auth_js])
.mount("/images", routes![covered_bridge])
.mount("/.well-known", routes![security, pgp_key])
.mount(
"/auth",
routes![
Expand Down
28 changes: 28 additions & 0 deletions static/.well-known/pgp-key.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
Comment: User-ID: Ashland Area Amateur Raio Club Temp <[email protected]>
Comment: Valid from: 2/16/2024 7:49 AM
Comment: Valid until: 2/16/2025 12:00 PM
Comment: Type: 521-bit ECDSA (secret key available)
Comment: Usage: Sign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Uj+ipL89ACT5tbvBvKroElmrdyixtNsB2ARCqCrN
9f0iTb6eVes=
=QnPj
-----END PGP PUBLIC KEY BLOCK-----
18 changes: 18 additions & 0 deletions static/.well-known/security.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Contact: mailto:[email protected]
Expires: 2025-02-16T05:00:00.000Z
Encryption: https://aaarc.austinh.dev/pgp-key.txt
Acknowledgments: https://aaarc.austinh.dev/hall-of-fame.html
Preferred-Languages: en
Canonical: httpd://aaarc.austinh.dev/.well-known/security.txt
Canonical: httpd://aaarc.austinh.dev/security.txt
-----BEGIN PGP SIGNATURE-----

iLkEARMKAB0WIQRDhibJKpGQomnLohwuavkUtxpHVQUCZc9bYAAKCRAuavkUtxpH
VfXZAgkB6y6RROgA+ZphV888YPcN5No7RIFokZQ7nh3m4479IJ3NPC3wXiVwwymP
sWk/YVWX3MHWxusfcbOzihrqMMSsBioCCQGbLJIxNSu8H89+2ZbPWH5OlFs9FuIN
MprZ99/yN3A1J0TTd/bEerBzpC/rxL0PWbS4QpUJO23yWfAkOfqi7Q2H6A==
=uAoi
-----END PGP SIGNATURE-----
14 changes: 14 additions & 0 deletions static/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
User-agent: Teoma
Disallow: /
User-agent: Gigabot
Disallow: /
User-agent: Nutch
Disallow: /
User-agent: psbot
Disallow: /
User-agent: *
Disallow:
Crawl-delay: 5
Disallow: /cgi-bin/
Disallow: /admin/
Sitemap: https://aaarc.austinh.dev/sitemap.xml
16 changes: 11 additions & 5 deletions static/sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,20 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://aaarc.austinh.dev/</loc>
<lastmod>2023-12-23</lastmod>
<lastmod>2023-02-14</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
<priority>0.9</priority>
</url>
<url>
<loc>https://aaarc.austinh.dev/repeaters</loc>
<lastmod>2022-01-02</lastmod>
<loc>https://aaarc.austinh.dev/.well-known/security.txt</loc>
<lastmod>2023-02-15</lastmod>
<changefreq>monthly</changefreq>
<priority>0.7</priority>
<priority>1</priority>
</url>
<url>
<loc>https://aaarc.austinh.dev/events</loc>
<lastmod>2023-02-14</lastmod>
<changefreq>monthly</changefreq>
<priority>0.9</priority>
</url>
</urlset>

0 comments on commit 36cb1dd

Please sign in to comment.