mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-06-25 16:19:19 +02:00
Reintroduce TFE duration metadata: DB columns, form fields, controllers, views, and migration
Add 'unsafe-eval' to CSP script-src directives (htmx requires Function())
This commit is contained in:
@@ -2,8 +2,6 @@
|
||||
require_once __DIR__ . '/../../bootstrap.php';
|
||||
require_once __DIR__ . '/../../src/AdminAuth.php';
|
||||
|
||||
error_log('[admin/login.php] ENTRY | method=' . $_SERVER['REQUEST_METHOD'] . ' | is_auth=' . (AdminAuth::isAuthenticated() ? '1' : '0') . ' | has_password=' . (AdminAuth::hasPassword() ? '1' : '0'));
|
||||
|
||||
if (!AdminAuth::hasPassword()) {
|
||||
header('Location: /admin/');
|
||||
exit;
|
||||
@@ -24,8 +22,11 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
}
|
||||
|
||||
$pageTitle = 'Connexion';
|
||||
$isAdmin = true; $bodyClass = 'admin-body';
|
||||
$isAdmin = true; $isLogin = true; $bodyClass = 'admin-body';
|
||||
require_once APP_ROOT . '/templates/head.php';
|
||||
include APP_ROOT . '/templates/header.php';
|
||||
include APP_ROOT . '/templates/admin/login.php';
|
||||
require_once APP_ROOT . '/templates/admin/footer.php';
|
||||
// Login page does not render the admin footer (no toast-region poll, no HTMX extras).
|
||||
// It closes <html> directly so there is no dangling HTMX polling the toast endpoint
|
||||
// while unauthenticated.
|
||||
echo "\n</body>\n</html>";
|
||||
|
||||
Reference in New Issue
Block a user