From f6908ee486298c38409e1a655617cef18537ce80 Mon Sep 17 00:00:00 2001 From: blankie Date: Sat, 2 Dec 2023 15:28:52 +1100 Subject: [PATCH] Send 404 for favicon.ico --- main.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.cpp b/main.cpp index ece043f..39bbb49 100644 --- a/main.cpp +++ b/main.cpp @@ -44,6 +44,11 @@ int main(int argc, char** argv) { server.Get("/", home_route); server.Get("/style.css", css_route); + server.Get("/favicon.ico", [](const httplib::Request& req, httplib::Response& res) { + res.status = 404; + serve_error(req, res, "404: Page not found"); + }); + server.Get("/settings", user_settings_route); server.Post("/settings", user_settings_route);