mirror of
https://github.com/PeWu/topola-viewer.git
synced 2026-04-20 13:36:16 +00:00
Changed CORS anywhere address #40
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -102,7 +102,7 @@ export function Intro() {
|
||||
}
|
||||
values={{
|
||||
link: (
|
||||
<a href="https://cors-anywhere.herokuapp.com/">cors-anywhere</a>
|
||||
<a href="https://topola-cors.herokuapp.com/">cors-anywhere</a>
|
||||
),
|
||||
}}
|
||||
/>
|
||||
|
||||
@@ -96,8 +96,8 @@ export class UrlMenu extends React.Component<
|
||||
}
|
||||
values={{
|
||||
link: (
|
||||
<a href="https://cors-anywhere.herokuapp.com/">
|
||||
cors-anywhere.herokuapp.com
|
||||
<a href="https://topola-cors.herokuapp.com/">
|
||||
topola-cors.herokuapp.com
|
||||
</a>
|
||||
),
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user