fix: MakerWorld Stealth-Plugin gegen Cloudflare-Erkennung, Debug-Screenshot CSP-konform
This commit is contained in:
@@ -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); }
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user