This commit is contained in:
johny
2026-01-29 00:06:23 +01:00
parent edac3b3836
commit 6f1cd16abb
14 changed files with 64 additions and 1 deletions

17
dist/index.php vendored Normal file
View File

@@ -0,0 +1,17 @@
<?php
$uri = $_SERVER['REQUEST_URI'];
if($uri == '/api'){
header('Content-Type: application/json; charset=utf-8');
header('Access-Control-Allow-Origin: *');
$json = json_decode(file_get_contents('./api.json'), true);
foreach ($json as $key => $value) {
$json[$key]['image'] = '//'.$_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT'].'/images/'.$value['image'];
}
echo json_encode($json);
die();
}
if($uri == '/'){
header('Location: /index.html');
die();
}