]> git.immae.eu Git - github/bastienwirtz/homer.git/commitdiff
Merge pull request #254 from rvankraaij/fix-cors-radarr-sonarr
authorBastien Wirtz <bastien.wirtz@gmail.com>
Sun, 15 Aug 2021 17:28:51 +0000 (10:28 -0700)
committerGitHub <noreply@github.com>
Sun, 15 Aug 2021 17:28:51 +0000 (10:28 -0700)
Fix cors issue with radarr and sonarr services

src/components/services/Radarr.vue
src/components/services/Sonarr.vue

index 93831a7bd87121c10fb5b5e638f94d59eae37ed2..9d3829279ca55f5ee48cf829561609ce3af2c095 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..7851b6b6b1dbc484e2da5218a2fa7926c239f746 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);