summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohann1502023-06-10 15:21:55 +0200
committerstuebinm2023-06-17 23:54:00 +0200
commit1b46a4c05c8d7db5b517061b5d46dc7327db7c98 (patch)
tree2dbf3ee29ff0a414a0c12518811b979c5c1224c4
parent59d807a2d7e1153086e00c129cdb9dbdac12263c (diff)
blackhole favicon.ico requests
It is not necessary to do anything for these kinds of requests, so instead of making the fuzzy search do stuff, just blackhole these requests.
-rw-r--r--src/bahnhofname.gleam2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/bahnhofname.gleam b/src/bahnhofname.gleam
index 8ddb090..708aca6 100644
--- a/src/bahnhofname.gleam
+++ b/src/bahnhofname.gleam
@@ -128,6 +128,8 @@ fn lookup_station(
fuzzy: fn (String) -> List(String)
) -> Response(BitBuilder) {
let #(code, text) = case request {
+ // blackhole favicon.ico requests instead of using the index
+ Request(method: Get, path: "/favicon.ico", ..) -> #(404, "")
Request(method: Get, path: "/help", ..)
| Request(method: Get, path: "/", ..) -> #(
200,