Deploy: 2026-05-23 03:56:31
This commit is contained in:
@@ -20,14 +20,42 @@ $router = new Router();
|
||||
$router->use(\App\Middlewares\SecurityMiddleware::class);
|
||||
|
||||
// 4. Define API Routes
|
||||
// Serve index.html dashboard on root path
|
||||
// Serve landing.html landing page on root path
|
||||
$router->get('/', function ($request, $response) {
|
||||
$response->setHeader('Content-Type', 'text/html; charset=utf-8');
|
||||
$response->sendHeaders();
|
||||
readfile(__DIR__ . '/landing.html');
|
||||
exit;
|
||||
});
|
||||
|
||||
// Serve index.html dashboard on app paths
|
||||
$router->get('/login', function ($request, $response) {
|
||||
$response->setHeader('Content-Type', 'text/html; charset=utf-8');
|
||||
$response->sendHeaders();
|
||||
readfile(__DIR__ . '/index.html');
|
||||
exit;
|
||||
});
|
||||
|
||||
$router->get('/register', function ($request, $response) {
|
||||
$response->setHeader('Content-Type', 'text/html; charset=utf-8');
|
||||
$response->sendHeaders();
|
||||
readfile(__DIR__ . '/index.html');
|
||||
exit;
|
||||
});
|
||||
|
||||
$router->get('/dashboard', function ($request, $response) {
|
||||
$response->setHeader('Content-Type', 'text/html; charset=utf-8');
|
||||
$response->sendHeaders();
|
||||
readfile(__DIR__ . '/index.html');
|
||||
exit;
|
||||
});
|
||||
|
||||
// Route for serving the dynamic landing mockup image
|
||||
$router->get('/landing_mockup.php', function ($request, $response) {
|
||||
require __DIR__ . '/landing_mockup.php';
|
||||
exit;
|
||||
});
|
||||
|
||||
// Serve admin.html super admin panel on /admin path
|
||||
$router->get('/admin', function ($request, $response) {
|
||||
$response->setHeader('Content-Type', 'text/html; charset=utf-8');
|
||||
|
||||
Reference in New Issue
Block a user