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