Revert "Remove blocked instance filter for .squid.wtf domains"
This reverts commit 4641fe20b2.
This commit is contained in:
parent
da6a030297
commit
b6b425affc
1 changed files with 7 additions and 2 deletions
|
|
@ -105,12 +105,17 @@ export const apiSettings = {
|
|||
|
||||
let groupedInstances = { api: [], streaming: [] };
|
||||
|
||||
const isBlockedInstance = (item) => {
|
||||
const url = typeof item === 'string' ? item : item.url;
|
||||
return url && /\.squid\.wtf/i.test(url);
|
||||
};
|
||||
|
||||
if (data.api && Array.isArray(data.api)) {
|
||||
groupedInstances.api = data.api;
|
||||
groupedInstances.api = data.api.filter((item) => !isBlockedInstance(item));
|
||||
}
|
||||
|
||||
if (data.streaming && Array.isArray(data.streaming)) {
|
||||
groupedInstances.streaming = data.streaming;
|
||||
groupedInstances.streaming = data.streaming.filter((item) => !isBlockedInstance(item));
|
||||
} else if (groupedInstances.api.length > 0) {
|
||||
groupedInstances.streaming = [...groupedInstances.api];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue