mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
api: Added 404 fallback for bad / invalid calls (#7952)
This commit is contained in:
@@ -33,6 +33,10 @@ if (Config::get('api.cors.enabled') === true) {
|
||||
require $config['install_dir'] . '/html/includes/api_functions.inc.php';
|
||||
$app->setName('api');
|
||||
|
||||
$app->notFound(function () use ($app) {
|
||||
api_error(404, "This API route doesn't exist.");
|
||||
});
|
||||
|
||||
$app->group(
|
||||
'/api',
|
||||
function () use ($app) {
|
||||
|
||||
Reference in New Issue
Block a user