- PHP-App unter hub/ für rinkplanner-hub.programmschmiede.de - MariaDB-Schema, Argon2id, Sessions, CSRF und Ratenbegrenzung - Einladungscodes, Admin-Bereich und Kür-Pakete mit Audiodatei - JSON-API v1 mit Bearer-Tokens für die Godot-App - Deployment und Erstinstallation über tools/deploy_hub.sh - Doku und Credentials-Vorlage ergänzt
24 lines
641 B
PHP
24 lines
641 B
PHP
<?php
|
||
declare(strict_types=1);
|
||
|
||
/**
|
||
* Rinkplanner-Hub – Front Controller.
|
||
* Apache leitet alle nicht vorhandenen Dateien über .htaccess hierher.
|
||
*/
|
||
|
||
require __DIR__ . '/app/bootstrap.php';
|
||
|
||
$uriPath = (string) parse_url((string) ($_SERVER['REQUEST_URI'] ?? '/'), PHP_URL_PATH);
|
||
$basePath = rtrim((string) config('app.base_path', ''), '/');
|
||
if ($basePath !== '' && str_starts_with($uriPath, $basePath)) {
|
||
$uriPath = substr($uriPath, strlen($basePath));
|
||
}
|
||
$path = '/' . trim($uriPath, '/');
|
||
$method = request_method();
|
||
|
||
if (str_starts_with($path, '/api/')) {
|
||
api_handle($method, $path);
|
||
exit;
|
||
}
|
||
|
||
page_handle($method, $path);
|