diff --git a/src/setup/config.ts b/src/setup/config.ts index 11769173..1af75305 100644 --- a/src/setup/config.ts +++ b/src/setup/config.ts @@ -14,6 +14,7 @@ interface Config { CORS_PROXY_URL: string; NORMAL_ROUTER: boolean; BACKEND_URL: string; + DISALLOWED_IDS: string; } export interface RuntimeConfig { @@ -25,6 +26,7 @@ export interface RuntimeConfig { NORMAL_ROUTER: boolean; PROXY_URLS: string[]; BACKEND_URL: string; + DISALLOWED_IDS: string[]; } const env: Record = { @@ -36,6 +38,7 @@ const env: Record = { CORS_PROXY_URL: import.meta.env.VITE_CORS_PROXY_URL, NORMAL_ROUTER: import.meta.env.VITE_NORMAL_ROUTER, BACKEND_URL: import.meta.env.VITE_BACKEND_URL, + DISALLOWED_IDS: import.meta.env.VITE_DISALLOWED_IDS, }; // loads from different locations, in order: environment (VITE_{KEY}), window (public/config.js) @@ -62,5 +65,8 @@ export function conf(): RuntimeConfig { .split(",") .map((v) => v.trim()), NORMAL_ROUTER: getKey("NORMAL_ROUTER", "false") === "true", + DISALLOWED_IDS: getKey("DISALLOWED_IDS", "") + .split(",") + .map((v) => v.trim()), // Should be comma-seperated and contain the media type and ID, formatted like so: movie-753342,movie-753342,movie-753342 }; }