fix: MakerWorld Stealth-Plugin gegen Cloudflare-Erkennung, Debug-Screenshot CSP-konform

This commit is contained in:
2026-07-11 07:24:46 +02:00
parent 98f21a4b05
commit 1557959eb0
3 changed files with 23 additions and 12 deletions

View File

@@ -274,13 +274,9 @@ function MakerworldTab({ toast }) {
const viewDebugScreenshot = async () => {
setLoadingScreenshot(true);
try {
const token = localStorage.getItem('sk_token');
const res = await fetch('/api/tools/makerworld/debug-screenshot', {
headers: token ? { 'Authorization': 'Bearer '+token } : {},
});
if (!res.ok) { toast?.('Kein Debug-Screenshot vorhanden','error'); return; }
const blob = await res.blob();
setDebugImgUrl(URL.createObjectURL(blob));
const r = await api('/tools/makerworld/debug-screenshot');
if (!r.image) { toast?.('Kein Debug-Screenshot vorhanden','error'); return; }
setDebugImgUrl(r.image); // bereits eine data:-URI, CSP-konform (kein blob:)
} catch(e) { toast?.(e.message,'error'); }
finally { setLoadingScreenshot(false); }
};