mirror of
https://github.com/Nezumi-2711/cloudflare-gateway-pihole-scripts.git
synced 2026-09-22 13:38:37 +00:00
Merge pull request #30 from hlqviet/fix/empty-list-environment-variables
Fix cases where the lists are empty string
This commit is contained in:
+6
-4
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user