- login.html: página de acceso con diseño Quiet Wealth (sin popup del browser) - api/login.php: endpoint POST para iniciar sesión, GET ?action=logout para cerrarla - auth.php: valida sesión PHP ($_SESSION) en lugar de HTTP Basic Auth - ui.js: apiFetch() intercepta 401 y redirige a login.html automáticamente - Todos los fetch() en dashboard, add y historial migrados a apiFetch() - Eliminado docker/htpasswd y auth_basic de NGINX Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
11 lines
252 B
PHP
11 lines
252 B
PHP
<?php
|
|
require_once __DIR__ . '/config.php';
|
|
|
|
session_start();
|
|
|
|
if (!isset($_SESSION['qw_auth'])) {
|
|
http_response_code(401);
|
|
header('Content-Type: application/json');
|
|
die(json_encode(['status' => 'error', 'message' => 'No autenticado']));
|
|
}
|