aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/components/services
diff options
context:
space:
mode:
authorrvk <329491+rvankraaij@users.noreply.github.com>2021-08-04 21:19:28 +0200
committerrvk <329491+rvankraaij@users.noreply.github.com>2021-08-04 21:19:28 +0200
commit25f99adc6c854f27dc1df4a88bf8da5b01812f46 (patch)
tree713a12d3b61f96c6fa191e35cee2ebff93934c92 /src/components/services
parent35926e1e6e4669e881b8f69003f97752172eb922 (diff)
downloadhomer-25f99adc6c854f27dc1df4a88bf8da5b01812f46.tar.gz
homer-25f99adc6c854f27dc1df4a88bf8da5b01812f46.tar.zst
homer-25f99adc6c854f27dc1df4a88bf8da5b01812f46.zip
Fix CORS issue for Radarr and Sonarr services
Diffstat (limited to 'src/components/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..3b88083 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..3460067 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);