mirror of
https://github.com/YGGverse/YGGtracker.git
synced 2026-04-01 17:45:31 +00:00
skip feed processing from self and non-condition url
This commit is contained in:
parent
bacdcc6ec0
commit
bacb8b17bf
1 changed files with 29 additions and 0 deletions
|
|
@ -35,6 +35,35 @@ try
|
||||||
file_get_contents(__DIR__ . '/../../config/nodes.json')
|
file_get_contents(__DIR__ . '/../../config/nodes.json')
|
||||||
) as $node)
|
) as $node)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// Skip reading to non-condition addresses
|
||||||
|
if ($manifestUrl = Yggverse\Parser\Url::parse($node->manifest))
|
||||||
|
{
|
||||||
|
if (!preg_match(YGGDRASIL_HOST_REGEX, str_replace(['[',']'], false, $manifestUrl->host->name)))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Skip reading current host
|
||||||
|
if ($thisUrl = Yggverse\Parser\Url::parse(WEBSITE_URL))
|
||||||
|
{
|
||||||
|
if ($manifestUrl->host->name == $thisUrl->host->name) // @TODO some mirrors could be available, improve condition
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// Manifest
|
// Manifest
|
||||||
if ($manifest = @json_decode(@file_get_contents($node->manifest)))
|
if ($manifest = @json_decode(@file_get_contents($node->manifest)))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue