diff options
| author | Fuwn <[email protected]> | 2024-02-07 04:09:43 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-02-07 04:09:43 -0800 |
| commit | d43edc045bbc0548e5fc31105fc4c362dc287dde (patch) | |
| tree | e031a6dc3e7c9798aa234171e84ceb18391f0ea8 /src | |
| parent | fix(hololive): call reload directly (diff) | |
| download | due.moe-d43edc045bbc0548e5fc31105fc4c362dc287dde.tar.xz due.moe-d43edc045bbc0548e5fc31105fc4c362dc287dde.zip | |
fix(hololive): proxy schedule
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/Utility/proxy.ts | 2 | ||||
| -rw-r--r-- | src/routes/hololive/+page.svelte | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/Utility/proxy.ts b/src/lib/Utility/proxy.ts index 11c87db8..6cf35e96 100644 --- a/src/lib/Utility/proxy.ts +++ b/src/lib/Utility/proxy.ts @@ -1,7 +1,7 @@ import { env } from '$env/dynamic/public'; export const proxy = (url: string, disable = false) => - env.PUBLIC_ANILIST_REDIRECT_URI?.includes('localhost') || disable + env.PUBLIC_ANILIST_REDIRECT_URI?.includes('localhost') && !disable ? url : `https://proxy.due.moe/?q=${url}`; diff --git a/src/routes/hololive/+page.svelte b/src/routes/hololive/+page.svelte index 18f94a4a..2635c01e 100644 --- a/src/routes/hololive/+page.svelte +++ b/src/routes/hololive/+page.svelte @@ -4,6 +4,7 @@ import Skeleton from '$lib/Loading/Skeleton.svelte'; import HeadTitle from '$lib/Home/HeadTitle.svelte'; import { parseScheduleHtml } from '$lib/hololive'; + import proxy from '$lib/Utility/proxy'; interface ParseResult { lives: { @@ -21,7 +22,7 @@ let schedulePromise: Promise<Response>; onMount(async () => { - schedulePromise = fetch('https://schedule.hololive.tv', { + schedulePromise = fetch(proxy('https://schedule.hololive.tv'), { headers: { Cookie: 'timezone=Asia/Tokyo' } |