Changed CORS anywhere address #40

This commit is contained in:
Przemek Wiech
2021-02-08 23:26:57 +01:00
parent eab1c707f3
commit e914511644
4 changed files with 5 additions and 5 deletions

View File

@@ -64,7 +64,7 @@ export async function loadFromUrl(
}
const urlToFetch = handleCors
? 'https://cors-anywhere.herokuapp.com/' + url
? 'https://topola-cors.herokuapp.com/' + url
: url;
const response = await window.fetch(urlToFetch);

View File

@@ -105,7 +105,7 @@ async function wikiTreeGet(request: WikiTreeRequest, handleCors: boolean) {
requestData.append(key, request[key]);
}
const apiUrl = handleCors
? 'https://cors-anywhere.herokuapp.com/https://api.wikitree.com/api.php'
? 'https://topola-cors.herokuapp.com/https://api.wikitree.com/api.php'
: 'https://api.wikitree.com/api.php';
const response = await window.fetch(apiUrl, {
method: 'POST',