sss
This commit is contained in:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user