aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikolay Govorov <me@govorov.online>2026-03-13 04:24:44 +0000
committerNikolay Govorov <me@govorov.online>2026-03-13 04:24:44 +0000
commit96170ff509ae0b25fa2023659df1d6c5277e106f (patch)
treea139c571eeeb39554665f87acf36f18f001d7a18
parent4ec3524379f4dc59bc2550d06cf40d8dbeec7208 (diff)
downloadtar
tar.gz
tar.bz2
tar.lz
tar.xz
tar.zst
zip
Prevents crawler robots from pointlessly downloading bundles :/
Diffstat
-rw-r--r--crates/zorian/src/assets/robots.txt5+5 −0
-rw-r--r--crates/zorian/src/controller_web.rs1+1 −0
2 files changed, 6 insertions, 0 deletions
diff --git a/crates/zorian/src/assets/robots.txt b/crates/zorian/src/assets/robots.txt
new file mode 100644
--- /dev/null
+++ b/crates/zorian/src/assets/robots.txt
@@ -0,0 +1,5 @@
+User-Agent: *
+Disallow: /zig/
+
+User-Agent: *
+Disallow: /go/
diff --git a/crates/zorian/src/controller_web.rs b/crates/zorian/src/controller_web.rs
index 7607315..ebd9ce1 100644
--- a/crates/zorian/src/controller_web.rs
+++ b/crates/zorian/src/controller_web.rs
@@ -48,6 +48,7 @@ fn get_asset(path: &str) -> Option<(&'static [u8], ContentType)> {
include_bytes!("assets/jetbrainsmono/JetBrainsMono-Italic[wght].woff2"),
ContentType::FontWoff2,
),
+ "robots.txt" => (include_bytes!("assets/robots.txt"), ContentType::TextPlain),
_ => return None,
})
}