rinkplanner/hub/web/index.php
torsten 055a2919c3 feat: Kür-Hub mit Einladungen, Uploads und API
- 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
2026-11-11 13:14:26 +01:00

24 lines
641 B
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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);