From c927ecefdefa1ccfce79795ef57a5aea8bdd4598 Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.me>
Date: Tue, 5 Dec 2023 23:58:35 -0800
Subject: fix(wrapped): no proxy on dev

---
 src/lib/Tools/Wrapped.svelte | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

(limited to 'src/lib/Tools/Wrapped.svelte')

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}
-- 
cgit v1.2.3

