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.
This commit is contained in:
Johann150 2023-06-10 15:21:55 +02:00 committed by stuebinm
parent 59d807a2d7
commit 1b46a4c05c

View file

@ -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,