diff options
| author | Fuwn <[email protected]> | 2026-03-22 03:42:05 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-03-22 03:42:05 +0000 |
| commit | 51949f1119cc58c7cb72e3fb8b23656ef1efa99c (patch) | |
| tree | 9cbfd213a82abbe37ce10a6c2f7a557cb68e78e2 /src/lib/Utility/proxy.ts | |
| parent | chore: remove stale websocket backup (diff) | |
| download | due.moe-51949f1119cc58c7cb72e3fb8b23656ef1efa99c.tar.xz due.moe-51949f1119cc58c7cb72e3fb8b23656ef1efa99c.zip | |
refactor: extract app origin config
Diffstat (limited to 'src/lib/Utility/proxy.ts')
| -rw-r--r-- | src/lib/Utility/proxy.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/Utility/proxy.ts b/src/lib/Utility/proxy.ts index c6577ac0..32f31226 100644 --- a/src/lib/Utility/proxy.ts +++ b/src/lib/Utility/proxy.ts @@ -1,9 +1,9 @@ -import { env } from "$env/dynamic/public"; +import { isLocalApp } from "$lib/Utility/appOrigin"; export const proxy = (url: string, disable = false) => { const randomKey = Math.floor(Math.random() * 90) + 10; - return env.PUBLIC_ANILIST_REDIRECT_URI?.includes("localhost") && !disable + return isLocalApp() && !disable ? url : `https://proxy.due.moe/?d2=${btoa( url |