From ecec695272f3e41d66401affea7f6fe5a93d3c28 Mon Sep 17 00:00:00 2001 From: Colin Date: Wed, 11 Aug 2021 15:25:51 -0700 Subject: [PATCH 1/9] include credentials while making fetch calls --- src/components/services/PiHole.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/services/PiHole.vue b/src/components/services/PiHole.vue index 7042a7b..ce0b689 100644 --- a/src/components/services/PiHole.vue +++ b/src/components/services/PiHole.vue @@ -64,7 +64,9 @@ export default { methods: { fetchStatus: async function () { const url = `${this.item.url}/api.php`; - this.api = await fetch(url) + this.api = await fetch(url{ + credentials: 'include' + }) .then((response) => response.json()) .catch((e) => console.log(e)); }, From 077be43473ebdb241c6a70e4d06795ca80a591fb Mon Sep 17 00:00:00 2001 From: Colin Date: Wed, 11 Aug 2021 15:35:41 -0700 Subject: [PATCH 2/9] Update AdGuardHome.vue --- src/components/services/AdGuardHome.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/services/AdGuardHome.vue b/src/components/services/AdGuardHome.vue index d4a2b89..bf5caa9 100644 --- a/src/components/services/AdGuardHome.vue +++ b/src/components/services/AdGuardHome.vue @@ -51,7 +51,9 @@ export default { }, methods: { fetchStatus: async function () { - this.status = await fetch(`${this.item.url}/control/status`).then( + this.status = await fetch(`${this.item.url}/control/status`{ + credentials: 'include', + }).then( (response) => response.json() ); }, From cf2fb08dc72cee1add0e6e9b3d4ba19b38da88d3 Mon Sep 17 00:00:00 2001 From: Colin Date: Wed, 11 Aug 2021 15:37:17 -0700 Subject: [PATCH 3/9] Update PaperlessNG.vue --- src/components/services/PaperlessNG.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/services/PaperlessNG.vue b/src/components/services/PaperlessNG.vue index 4fb31f8..63a49a9 100644 --- a/src/components/services/PaperlessNG.vue +++ b/src/components/services/PaperlessNG.vue @@ -59,6 +59,7 @@ export default { } const url = `${this.item.url}/api/documents/`; this.api = await fetch(url, { + credentials: 'include', headers: { Authorization: "Token " + this.item.apikey, }, From 76a46c3507b5c0daef7edcb165e949dea4968e2f Mon Sep 17 00:00:00 2001 From: Colin Date: Wed, 11 Aug 2021 15:38:24 -0700 Subject: [PATCH 4/9] Update Ping.vue --- src/components/services/Ping.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/services/Ping.vue b/src/components/services/Ping.vue index 8a9b7a4..e693af4 100644 --- a/src/components/services/Ping.vue +++ b/src/components/services/Ping.vue @@ -50,7 +50,11 @@ export default { methods: { fetchStatus: async function () { const url = `${this.item.url}`; - fetch(url, { method: "HEAD", cache: "no-cache" }) + fetch(url, { + method: "HEAD", + cache: "no-cache", + credentials: "include", + }) .then((response) => { if (!response.ok) { throw Error(response.statusText); From 0dc3cea15ed9d24d35e6383c89036e8a5e2eb83a Mon Sep 17 00:00:00 2001 From: Colin Date: Wed, 11 Aug 2021 15:40:22 -0700 Subject: [PATCH 5/9] Update PiHole.vue --- src/components/services/PiHole.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/services/PiHole.vue b/src/components/services/PiHole.vue index ce0b689..ca87f9d 100644 --- a/src/components/services/PiHole.vue +++ b/src/components/services/PiHole.vue @@ -65,7 +65,7 @@ export default { fetchStatus: async function () { const url = `${this.item.url}/api.php`; this.api = await fetch(url{ - credentials: 'include' + credentials: "include", }) .then((response) => response.json()) .catch((e) => console.log(e)); From 2f6d9e1b0910b5fb219ebd5078dbf940ed16f619 Mon Sep 17 00:00:00 2001 From: Colin Date: Wed, 11 Aug 2021 15:41:11 -0700 Subject: [PATCH 6/9] Update PaperlessNG.vue --- src/components/services/PaperlessNG.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/services/PaperlessNG.vue b/src/components/services/PaperlessNG.vue index 63a49a9..af13317 100644 --- a/src/components/services/PaperlessNG.vue +++ b/src/components/services/PaperlessNG.vue @@ -59,7 +59,7 @@ export default { } const url = `${this.item.url}/api/documents/`; this.api = await fetch(url, { - credentials: 'include', + credentials: "include", headers: { Authorization: "Token " + this.item.apikey, }, From 4852ae6b85d5a35dc0c94711cdae8f804d32f762 Mon Sep 17 00:00:00 2001 From: Colin Date: Wed, 11 Aug 2021 15:41:33 -0700 Subject: [PATCH 7/9] Update AdGuardHome.vue --- src/components/services/AdGuardHome.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/services/AdGuardHome.vue b/src/components/services/AdGuardHome.vue index bf5caa9..9a3350d 100644 --- a/src/components/services/AdGuardHome.vue +++ b/src/components/services/AdGuardHome.vue @@ -52,7 +52,7 @@ export default { methods: { fetchStatus: async function () { this.status = await fetch(`${this.item.url}/control/status`{ - credentials: 'include', + credentials: "include", }).then( (response) => response.json() ); From 7efcd282bb82463968a03f0f5c4a756a0d95c09c Mon Sep 17 00:00:00 2001 From: Colin Date: Mon, 16 Aug 2021 14:16:29 -0700 Subject: [PATCH 8/9] Update AdGuardHome.vue --- src/components/services/AdGuardHome.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/services/AdGuardHome.vue b/src/components/services/AdGuardHome.vue index 9a3350d..9238060 100644 --- a/src/components/services/AdGuardHome.vue +++ b/src/components/services/AdGuardHome.vue @@ -51,7 +51,7 @@ export default { }, methods: { fetchStatus: async function () { - this.status = await fetch(`${this.item.url}/control/status`{ + this.status = await fetch(`${this.item.url}/control/status`, { credentials: "include", }).then( (response) => response.json() From bbe7149d5814efc1d97613af107b12ba8f8a1c22 Mon Sep 17 00:00:00 2001 From: Colin Date: Mon, 16 Aug 2021 14:17:15 -0700 Subject: [PATCH 9/9] Update PiHole.vue --- src/components/services/PiHole.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/services/PiHole.vue b/src/components/services/PiHole.vue index ca87f9d..87f7090 100644 --- a/src/components/services/PiHole.vue +++ b/src/components/services/PiHole.vue @@ -64,7 +64,7 @@ export default { methods: { fetchStatus: async function () { const url = `${this.item.url}/api.php`; - this.api = await fetch(url{ + this.api = await fetch(url, { credentials: "include", }) .then((response) => response.json())