Gildas преди 7 години
родител
ревизия
3913680cf4
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      lib/fetch/content/fetch.js

+ 2 - 2
lib/fetch/content/fetch.js

@@ -25,7 +25,7 @@ this.superFetch = this.superFetch || (() => {
 	const superFetch = {
 		fetch: async url => {
 			try {
-				return await fetch(url, { mode: "cors" });
+				return await fetch(url, { mode: "cors", credentials: "include" });
 			} 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, { mode: "cors" });
+			return await XPCNativeWrapper(wrappedJSObject.fetch)(url, { mode: "cors", credentials: "include" });
 		};
 	}
 	return superFetch;