mvc: hook default action in api.php in case someone bolds an api call to the controller index.

This commit is contained in:
Ad Schellevis 2024-07-18 13:35:27 +02:00
parent 17f3f43e97
commit 3934f74a5a

View File

@ -33,7 +33,10 @@ try {
});
$router = new OPNsense\Mvc\Router('/api/', 'Api');
$response = $router->routeRequest($_SERVER['REQUEST_URI']);
$response = $router->routeRequest($_SERVER['REQUEST_URI'], [
'action' => 'indexAction',
]);
if (!$response->isSent()) {
$response->send();
}