diff options
author | Johann150 | 2023-06-10 15:21:55 +0200 |
---|---|---|
committer | stuebinm | 2023-06-17 23:54:00 +0200 |
commit | 1b46a4c05c8d7db5b517061b5d46dc7327db7c98 (patch) | |
tree | 2dbf3ee29ff0a414a0c12518811b979c5c1224c4 /src/bahnhofname.gleam | |
parent | 59d807a2d7e1153086e00c129cdb9dbdac12263c (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.
Diffstat (limited to 'src/bahnhofname.gleam')
-rw-r--r-- | src/bahnhofname.gleam | 2 |
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, |