diff options
| author | Fuwn <[email protected]> | 2023-12-05 23:58:35 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-12-05 23:59:46 -0800 |
| commit | c927ecefdefa1ccfce79795ef57a5aea8bdd4598 (patch) | |
| tree | 2514cdb0afcbf4ad7d40ed20bbd8ade823839e08 /src/lib/Tools | |
| parent | feat(settings): remove force theme (diff) | |
| download | due.moe-c927ecefdefa1ccfce79795ef57a5aea8bdd4598.tar.xz due.moe-c927ecefdefa1ccfce79795ef57a5aea8bdd4598.zip | |
fix(wrapped): no proxy on dev
Diffstat (limited to 'src/lib/Tools')
| -rw-r--r-- | src/lib/Tools/Wrapped.svelte | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/Tools/Wrapped.svelte b/src/lib/Tools/Wrapped.svelte index 239e4c7a..e454f194 100644 --- a/src/lib/Tools/Wrapped.svelte +++ b/src/lib/Tools/Wrapped.svelte @@ -16,6 +16,7 @@ import { browser } from '$app/environment'; import { page } from '$app/stores'; import { clearAllParameters } from './tool.js'; + import { env } from '$env/dynamic/public'; export let user: AniListAuthorisation; @@ -283,7 +284,10 @@ // return string.slice(0, maxLength - 3) + ' …'; // }; - const proxy = (url: string) => `/api/proxy?url=${encodeURIComponent(url)}`; + const proxy = (url: string) => + env.PUBLIC_ANILIST_REDIRECT_URI.includes('192.168') + ? url + : `/api/proxy?url=${encodeURIComponent(url)}`; </script> {#if currentUserIdentity.id === -2} |