aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorBastien Wirtz <bastien.wirtz@gmail.com>2021-08-15 10:28:51 -0700
committerGitHub <noreply@github.com>2021-08-15 10:28:51 -0700
commit6b54eedae7bf2632fbb1ec1d9419a7b71cf102cc (patch)
tree5f876f4999c48b19d635f16a9602854419cf84fa
parent35926e1e6e4669e881b8f69003f97752172eb922 (diff)
parent304362adfd5fe06d7b55fe99087543e09f1ef3d8 (diff)
downloadhomer-6b54eedae7bf2632fbb1ec1d9419a7b71cf102cc.tar.gz
homer-6b54eedae7bf2632fbb1ec1d9419a7b71cf102cc.tar.zst
homer-6b54eedae7bf2632fbb1ec1d9419a7b71cf102cc.zip
Merge pull request #254 from rvankraaij/fix-cors-radarr-sonarr
Fix cors issue with radarr and sonarr services
-rw-r--r--src/components/services/Radarr.vue10
-rw-r--r--src/components/services/Sonarr.vue10
2 files changed, 4 insertions, 16 deletions
diff --git a/src/components/services/Radarr.vue b/src/components/services/Radarr.vue
index 93831a7..9d38292 100644
--- a/src/components/services/Radarr.vue
+++ b/src/components/services/Radarr.vue
@@ -70,10 +70,7 @@ export default {
70 }, 70 },
71 methods: { 71 methods: {
72 fetchConfig: function () { 72 fetchConfig: function () {
73 fetch(`${this.item.url}/api/health`, { 73 fetch(`${this.item.url}/api/health?apikey=${this.item.apikey}`)
74 credentials: "include",
75 headers: { "X-Api-Key": `${this.item.apikey}` },
76 })
77 .then((response) => { 74 .then((response) => {
78 if (response.status != 200) { 75 if (response.status != 200) {
79 throw new Error(response.statusText); 76 throw new Error(response.statusText);
@@ -95,10 +92,7 @@ export default {
95 console.error(e); 92 console.error(e);
96 this.serverError = true; 93 this.serverError = true;
97 }); 94 });
98 fetch(`${this.item.url}/api/queue`, { 95 fetch(`${this.item.url}/api/queue?apikey=${this.item.apikey}`)
99 credentials: "include",
100 headers: { "X-Api-Key": `${this.item.apikey}` },
101 })
102 .then((response) => { 96 .then((response) => {
103 if (response.status != 200) { 97 if (response.status != 200) {
104 throw new Error(response.statusText); 98 throw new Error(response.statusText);
diff --git a/src/components/services/Sonarr.vue b/src/components/services/Sonarr.vue
index 8cebac4..7851b6b 100644
--- a/src/components/services/Sonarr.vue
+++ b/src/components/services/Sonarr.vue
@@ -70,10 +70,7 @@ export default {
70 }, 70 },
71 methods: { 71 methods: {
72 fetchConfig: function () { 72 fetchConfig: function () {
73 fetch(`${this.item.url}/api/health`, { 73 fetch(`${this.item.url}/api/health?apikey=${this.item.apikey}`)
74 credentials: "include",
75 headers: { "X-Api-Key": `${this.item.apikey}` },
76 })
77 .then((response) => { 74 .then((response) => {
78 if (response.status != 200) { 75 if (response.status != 200) {
79 throw new Error(response.statusText); 76 throw new Error(response.statusText);
@@ -95,10 +92,7 @@ export default {
95 console.error(e); 92 console.error(e);
96 this.serverError = true; 93 this.serverError = true;
97 }); 94 });
98 fetch(`${this.item.url}/api/queue`, { 95 fetch(`${this.item.url}/api/queue?apikey=${this.item.apikey}`)
99 credentials: "include",
100 headers: { "X-Api-Key": `${this.item.apikey}` },
101 })
102 .then((response) => { 96 .then((response) => {
103 if (response.status != 200) { 97 if (response.status != 200) {
104 throw new Error(response.statusText); 98 throw new Error(response.statusText);