mirror of
https://github.com/mivodev/mivo.git
synced 2026-01-26 05:25:42 +07:00
Initial Release v1.0.0: Full feature set with Docker automation, Nginx/Alpine stack
This commit is contained in:
20
routes/api.php
Normal file
20
routes/api.php
Normal 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']);
|
||||
Reference in New Issue
Block a user