Fix CORS issue for Radarr and Sonarr services

This commit is contained in:
rvk 2021-08-04 21:19:28 +02:00
parent 35926e1e6e
commit 25f99adc6c
2 changed files with 4 additions and 16 deletions

View File

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

View File

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