tangled
alpha
login
or
join now
jordanreger.com
/
htmlsky
0
fork
atom
An HTML-only Bluesky frontend
0
fork
atom
overview
issues
pulls
pipelines
these bots are awful
jordanreger.com
2 years ago
b49cbb53
777971f3
+10
-1
1 changed file
expand all
collapse all
unified
split
main.js
+10
-1
main.js
···
9
9
Deno.serve(async (req) => {
10
10
// TEMPORARY: FOR BOT DETECTION ONLY
11
11
const headers = new Headers(req.headers);
12
12
-
console.log(headers.get("user-agent"));
12
12
+
const ua = headers.get("user-agent");
13
13
+
14
14
+
if (
15
15
+
ua.includes("amazon") ||
16
16
+
ua.includes("facebook") ||
17
17
+
ua.includes("Bytespider") ||
18
18
+
ua.includes("bot")
19
19
+
) {
20
20
+
return new Response("GO AWAY", {status: 403});
21
21
+
}
13
22
14
23
const url = new URL(req.url);
15
24
const path = url.pathname;