Send 404 for favicon.ico
This commit is contained in:
parent
278deff6da
commit
f6908ee486
5
main.cpp
5
main.cpp
|
@ -44,6 +44,11 @@ int main(int argc, char** argv) {
|
||||||
|
|
||||||
server.Get("/", home_route);
|
server.Get("/", home_route);
|
||||||
server.Get("/style.css", css_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.Get("/settings", user_settings_route);
|
||||||
server.Post("/settings", user_settings_route);
|
server.Post("/settings", user_settings_route);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue