fix proxy
This commit is contained in:
parent
c3b519382b
commit
b09800f152
|
|
@ -63,6 +63,10 @@ export const fetchViaProxy = async (
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return raw;
|
return raw;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (body instanceof File) {
|
||||||
|
const res = await fetch(url, { body, headers: _headers });
|
||||||
|
return await res.text();
|
||||||
} else {
|
} else {
|
||||||
const res = await fetch(`${w.basehost ? w.basehost : ""}/_proxy`, {
|
const res = await fetch(`${w.basehost ? w.basehost : ""}/_proxy`, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
|
|
@ -94,4 +98,5 @@ export const fetchViaProxy = async (
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue