Add route to handle default browser favicon.ico request

This commit is contained in:
Benjamin Renard 2020-06-25 11:55:20 +02:00
parent 3c27fa92ca
commit 0ce63f3d1e

View file

@ -262,6 +262,18 @@ function handle_static_file($request) {
}
LSurl :: add_handler('#^(?P<type>image|css|js)/(?P<file>[^/]+)$#', '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
*