From 0ce63f3d1e5c05d52b0c64545c07c03d0c88bca2 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Thu, 25 Jun 2020 11:55:20 +0200 Subject: [PATCH] Add route to handle default browser favicon.ico request --- src/includes/routes.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/includes/routes.php b/src/includes/routes.php index 67e413dd..e550bda9 100644 --- a/src/includes/routes.php +++ b/src/includes/routes.php @@ -262,6 +262,18 @@ function handle_static_file($request) { } LSurl :: add_handler('#^(?Pimage|css|js)/(?P[^/]+)$#', 'handle_static_file', false); +/* + * Handle default browser favicon.ico request + * + * @param[in] $request LSurlRequest The request + * + * @retval void + */ +function handle_favicon_ico_view($request) { + LSurl :: redirect('image/favicon'); +} +LSurl :: add_handler('#^favicon\.ico#', 'handle_favicon_ico_view', false); + /* * Handle libs file request *