Publier Globinours 1.0.0-rc.3

This commit is contained in:
Alexandre NOEL 2026-09-03 12:39:15 +02:00
commit 9a2b4068da
325 changed files with 38230 additions and 20 deletions

20
public/router.php Normal file
View file

@ -0,0 +1,20 @@
<?php
declare(strict_types=1);
// Routeur destiné uniquement au serveur PHP intégré pour les démonstrations.
$requestPath = rawurldecode((string) (parse_url($_SERVER['REQUEST_URI'] ?? '/', PHP_URL_PATH) ?: '/'));
$publicRoot = realpath(__DIR__);
$requestedFile = realpath(__DIR__ . $requestPath);
if (
$requestPath !== '/' &&
$publicRoot !== false &&
$requestedFile !== false &&
str_starts_with($requestedFile, $publicRoot . DIRECTORY_SEPARATOR) &&
is_file($requestedFile)
) {
return false;
}
require __DIR__ . '/index.php';