provide basic rest api

This commit is contained in:
frederik
2025-08-17 14:21:04 +02:00
committed by Nachtzuster
parent cea5dbfd97
commit 5f4cb4f101
2 changed files with 50 additions and 0 deletions
+7
View File
@@ -1,5 +1,12 @@
<?php
$requestUri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
if (strpos($requestUri, '/api/v1/') === 0) {
include_once 'scripts/api.php';
die();
}
/* Prevent XSS input */
$_GET = filter_input_array(INPUT_GET, FILTER_SANITIZE_STRING);
$_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);