From 51949f1119cc58c7cb72e3fb8b23656ef1efa99c Mon Sep 17 00:00:00 2001 From: Fuwn Date: Sun, 22 Mar 2026 03:42:05 +0000 Subject: refactor: extract app origin config --- scripts/check-with-fallback-env.sh | 1 + src/lib/Settings/Categories/RSSFeeds.svelte | 6 ++---- src/lib/Utility/appOrigin.ts | 32 +++++++++++++++++++++++++++++ src/lib/Utility/image.ts | 4 ++-- src/lib/Utility/proxy.ts | 4 ++-- src/lib/Utility/root.ts | 6 ++---- 6 files changed, 41 insertions(+), 12 deletions(-) create mode 100644 src/lib/Utility/appOrigin.ts diff --git a/scripts/check-with-fallback-env.sh b/scripts/check-with-fallback-env.sh index 5efb64d4..a3c5d7c0 100644 --- a/scripts/check-with-fallback-env.sh +++ b/scripts/check-with-fallback-env.sh @@ -4,6 +4,7 @@ set -euo pipefail export SUPABASE_URL="${SUPABASE_URL:-http://localhost:54321}" export SUPABASE_ANON_KEY="${SUPABASE_ANON_KEY:-dummy}" +export PUBLIC_APP_ORIGIN="${PUBLIC_APP_ORIGIN:-http://localhost:5173}" export PUBLIC_ANILIST_CLIENT_ID="${PUBLIC_ANILIST_CLIENT_ID:-dummy}" export ANILIST_CLIENT_SECRET="${ANILIST_CLIENT_SECRET:-dummy}" export PUBLIC_ANILIST_REDIRECT_URI="${PUBLIC_ANILIST_REDIRECT_URI:-http://localhost:5173/api/oauth/callback}" diff --git a/src/lib/Settings/Categories/RSSFeeds.svelte b/src/lib/Settings/Categories/RSSFeeds.svelte index bf40eab4..fee411f4 100644 --- a/src/lib/Settings/Categories/RSSFeeds.svelte +++ b/src/lib/Settings/Categories/RSSFeeds.svelte @@ -1,7 +1,7 @@