Merge pull request #30 from hlqviet/fix/empty-list-environment-variables

Fix cases where the lists are empty string
This commit is contained in:
mrrfv
2023-09-21 20:10:39 +02:00
committed by GitHub
+6 -4
View File
@@ -32,11 +32,13 @@ export const LIST_TYPE = {
BLOCKLIST: "blocklist",
};
export const USER_DEFINED_ALLOWLIST_URLS =
process.env.ALLOWLIST_URLS?.split("\n");
export const USER_DEFINED_ALLOWLIST_URLS = process.env.ALLOWLIST_URLS
? process.env.ALLOWLIST_URLS.split("\n")
: undefined;
export const USER_DEFINED_BLOCKLIST_URLS =
process.env.BLOCKLIST_URLS?.split("\n");
export const USER_DEFINED_BLOCKLIST_URLS = process.env.BLOCKLIST_URLS
? process.env.BLOCKLIST_URLS.split("\n")
: undefined;
export const RECOMMENDED_ALLOWLIST_URLS = [
"https://raw.githubusercontent.com/im-sm/Pi-hole-Torrent-Blocklist/main/all-torrent-trackres.txt",