This commit is contained in:
2025-12-28 01:19:52 +01:00
parent 50d803dade
commit 6ba658262f
2 changed files with 108 additions and 0 deletions

View File

@@ -9,5 +9,16 @@ declare(strict_types=1);
// Force scope flag so ApiKernel can limit available actions if needed
$_GET['scope'] = $_GET['scope'] ?? 'external';
// Map /external/render requests to the correct ApiKernel action when no action is given
$reqPath = parse_url($_SERVER['REQUEST_URI'] ?? '', PHP_URL_PATH);
if (
empty($_GET['action'])
&& empty($_POST['action'])
&& is_string($reqPath)
&& preg_match('~^/external/render/?$~', $reqPath)
) {
$_POST['action'] = 'external.render';
}
// Re-use the existing kernel bootstrap
require_once __DIR__ . '/../public/api.php';