Remove empty lines from the user-defined list URLs

Possible fix for #33
This commit is contained in:
mrrfv
2023-09-27 14:10:12 +00:00
parent 5977de1b95
commit 862dcb15bb
+3 -2
View File
@@ -33,11 +33,12 @@ export const LIST_TYPE = {
}; };
export const USER_DEFINED_ALLOWLIST_URLS = process.env.ALLOWLIST_URLS export const USER_DEFINED_ALLOWLIST_URLS = process.env.ALLOWLIST_URLS
? process.env.ALLOWLIST_URLS.split("\n") // .filter(x => x) removes empty items from the URL arrays
? process.env.ALLOWLIST_URLS.split("\n").filter(x => x)
: undefined; : undefined;
export const USER_DEFINED_BLOCKLIST_URLS = process.env.BLOCKLIST_URLS export const USER_DEFINED_BLOCKLIST_URLS = process.env.BLOCKLIST_URLS
? process.env.BLOCKLIST_URLS.split("\n") ? process.env.BLOCKLIST_URLS.split("\n").filter(x => x)
: undefined; : undefined;
export const RECOMMENDED_ALLOWLIST_URLS = [ export const RECOMMENDED_ALLOWLIST_URLS = [