Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

os: strict EFI download only from oven origin

+9 -4
+9 -4
system/public/aesthetic.computer/disks/os.mjs
··· 926 926 "&wifi=" + (wifiEnabled ? "1" : "0") + 927 927 "&layout=efi&strict=1&cb=" + Date.now() + 928 928 (variantIdx === 1 ? "&variant=cl" : ""); 929 - const isoCandidates = [ 930 - OVEN_ORIGIN + "/os-image" + query, 931 - OVEN + "/os-image" + query, 932 - ]; 929 + // Strict EFI downloads must come from oven origin. 930 + // The edge worker can return stale/truncated artifacts without layout headers. 931 + const isoCandidates = [OVEN_ORIGIN + "/os-image" + query]; 933 932 const MIN_EXPECTED_EFI_BYTES = 300 * 1024 * 1024; 934 933 const MIN_EXPECTED_ISO_BYTES = 200 * 1024 * 1024; 935 934 ··· 955 954 } 956 955 957 956 const servedLayout = (attempt.headers.get("x-ac-os-layout") || "").toLowerCase(); 957 + if (!servedLayout) { 958 + console.warn("[os] Missing x-ac-os-layout header from", url); 959 + try { attempt.body?.cancel(); } catch (_) {} 960 + lastErr = "Server did not report image layout (x-ac-os-layout missing)"; 961 + continue; 962 + } 958 963 if (servedLayout && servedLayout !== "efi") { 959 964 console.warn("[os] Rejecting non-EFI response:", servedLayout, "from", url); 960 965 try { attempt.body?.cancel(); } catch (_) {}