|
|
@@ -25,7 +25,7 @@ this.superFetch = this.superFetch || (() => {
|
|
|
const superFetch = {
|
|
|
fetch: async url => {
|
|
|
try {
|
|
|
- return await fetch(url);
|
|
|
+ return await fetch(url, { mode: "cors" });
|
|
|
} catch (error) {
|
|
|
const responseFetch = await sendMessage({ method: "fetch", url });
|
|
|
return {
|
|
|
@@ -40,7 +40,7 @@ this.superFetch = this.superFetch || (() => {
|
|
|
};
|
|
|
if (typeof XPCNativeWrapper != "undefined" && typeof wrappedJSObject != "undefined") {
|
|
|
superFetch.hostFetch = async url => {
|
|
|
- return await XPCNativeWrapper(wrappedJSObject.fetch)(url);
|
|
|
+ return await XPCNativeWrapper(wrappedJSObject.fetch)(url, { mode: "cors" });
|
|
|
};
|
|
|
}
|
|
|
return superFetch;
|