]> git.immae.eu Git - github/bastienwirtz/homer.git/commitdiff
Fix CORS issue for Radarr and Sonarr services
authorrvk <329491+rvankraaij@users.noreply.github.com>
Wed, 4 Aug 2021 19:19:28 +0000 (21:19 +0200)
committerrvk <329491+rvankraaij@users.noreply.github.com>
Wed, 4 Aug 2021 19:19:28 +0000 (21:19 +0200)
src/components/services/Radarr.vue
src/components/services/Sonarr.vue

index 93831a7bd87121c10fb5b5e638f94d59eae37ed2..3b8808368d802348170badf36c8ef782c56b9f3e 100644 (file)
@@ -70,10 +70,7 @@ export default {
   },
   methods: {
     fetchConfig: function () {
-      fetch(`${this.item.url}/api/health`, {
-        credentials: "include",
-        headers: { "X-Api-Key": `${this.item.apikey}` },
-      })
+      fetch(`${this.item.url}/api/health?apiKey=${this.item.apikey}`)
         .then((response) => {
           if (response.status != 200) {
             throw new Error(response.statusText);
@@ -95,10 +92,7 @@ export default {
           console.error(e);
           this.serverError = true;
         });
-      fetch(`${this.item.url}/api/queue`, {
-        credentials: "include",
-        headers: { "X-Api-Key": `${this.item.apikey}` },
-      })
+      fetch(`${this.item.url}/api/queue?apiKey=${this.item.apikey}`)
         .then((response) => {
           if (response.status != 200) {
             throw new Error(response.statusText);
index 8cebac45432fdaa7ceb2fe3cf7a107c48533eb27..3460067529b7b6809225060896b90483b28d8396 100644 (file)
@@ -70,10 +70,7 @@ export default {
   },
   methods: {
     fetchConfig: function () {
-      fetch(`${this.item.url}/api/health`, {
-        credentials: "include",
-        headers: { "X-Api-Key": `${this.item.apikey}` },
-      })
+      fetch(`${this.item.url}/api/health?apiKey=${this.item.apikey}`)
         .then((response) => {
           if (response.status != 200) {
             throw new Error(response.statusText);
@@ -95,10 +92,7 @@ export default {
           console.error(e);
           this.serverError = true;
         });
-      fetch(`${this.item.url}/api/queue`, {
-        credentials: "include",
-        headers: { "X-Api-Key": `${this.item.apikey}` },
-      })
+      fetch(`${this.item.url}/api/queue?apiKey=${this.item.apikey}`)
         .then((response) => {
           if (response.status != 200) {
             throw new Error(response.statusText);