From e914511644243af7746bd40675d7d57dc79a8fd7 Mon Sep 17 00:00:00 2001 From: Przemek Wiech Date: Mon, 8 Feb 2021 23:26:57 +0100 Subject: [PATCH] Changed CORS anywhere address #40 --- src/datasource/load_data.ts | 2 +- src/datasource/wikitree.ts | 2 +- src/intro.tsx | 2 +- src/menu/url_menu.tsx | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/datasource/load_data.ts b/src/datasource/load_data.ts index 81aa4ed..b5bdb00 100644 --- a/src/datasource/load_data.ts +++ b/src/datasource/load_data.ts @@ -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); diff --git a/src/datasource/wikitree.ts b/src/datasource/wikitree.ts index c5f14d3..41d65ce 100644 --- a/src/datasource/wikitree.ts +++ b/src/datasource/wikitree.ts @@ -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', diff --git a/src/intro.tsx b/src/intro.tsx index 716ea66..d00ba6d 100644 --- a/src/intro.tsx +++ b/src/intro.tsx @@ -102,7 +102,7 @@ export function Intro() { } values={{ link: ( - cors-anywhere + cors-anywhere ), }} /> diff --git a/src/menu/url_menu.tsx b/src/menu/url_menu.tsx index dc7e3a5..be7234e 100644 --- a/src/menu/url_menu.tsx +++ b/src/menu/url_menu.tsx @@ -96,8 +96,8 @@ export class UrlMenu extends React.Component< } values={{ link: ( - - cors-anywhere.herokuapp.com + + topola-cors.herokuapp.com ), }}