location.replace("' . $target . '")'; echo ''; } exit; } } function require_api_auth(): void { if (!is_logged_in()) { header('Content-Type: application/json; charset=utf-8'); http_response_code(401); echo json_encode(['error' => 'unauthorized']); exit; } }