Initial Release v1.0.0: Full feature set with Docker automation, Nginx/Alpine stack

This commit is contained in:
dyzulk
2026-01-16 11:21:32 +07:00
commit 45623973a8
139 changed files with 24302 additions and 0 deletions

20
routes/api.php Normal file
View File

@@ -0,0 +1,20 @@
<?php
// API Routes
// These routes do not use the session in the URL prefix by default,
// but might require session/id in the POST body for authentication context.
// API CORS Handling
if (strpos($_SERVER['REQUEST_URI'] ?? '', '/api/') !== false) {
\App\Core\Middleware::cors();
}
$router->post('/api/router/interfaces', [App\Controllers\ApiController::class, 'getInterfaces']);
// Public Status API (No Auth Check in Controller)
$router->post('/api/status/check', [App\Controllers\PublicStatusController::class, 'check']);
// Voucher Check (Code/Username in URL) - Support GET (Status Page) and POST (Login Page Check)
$router->post('/api/voucher/check/{code}', [App\Controllers\PublicStatusController::class, 'check']);
$router->get('/api/voucher/check/{code}', [App\Controllers\PublicStatusController::class, 'check']);