mirror of
https://github.com/myronblair/jarvis
synced 2026-06-30 17:50:23 -05:00
Fix admin: add Cache-Control: no-transform to block Cloudflare Rocket Loader
This commit is contained in:
@@ -5,6 +5,9 @@ require_once __DIR__ . '/../../api/lib/db.php';
|
||||
session_name('jarvis_admin');
|
||||
session_start();
|
||||
|
||||
// Prevent Cloudflare Rocket Loader from deferring inline scripts (breaks doLogin, CAT_COLORS, etc.)
|
||||
header('Cache-Control: no-transform');
|
||||
|
||||
// ── AUTH HELPERS ──────────────────────────────────────────────────────────────
|
||||
function loggedIn(): bool { return !empty($_SESSION['admin_user']); }
|
||||
function j(mixed $d): never { header('Content-Type: application/json'); echo json_encode($d); exit; }
|
||||
|
||||
Reference in New Issue
Block a user