Fix a caching pollution issue when using static
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 32s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 1m35s
Create Docker Image / Final Docker Image Manifest (push) Successful in 10s

This commit is contained in:
Deon George 2024-04-14 10:23:21 +10:00
parent bac41969a5
commit 9299697ec1
3 changed files with 6 additions and 5 deletions

View File

@ -48,7 +48,7 @@ MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
FIDO_DIR=fido
FIDO_PACKET_KEEP=
FIDO_STRICT=FALSE
FIDO_STRICT=TRUE
FILESYSTEM_DISK=s3
AWS_ACCESS_KEY_ID=

View File

@ -107,10 +107,10 @@ function our_address(Domain $do=NULL,Address $ao=NULL): Collection|Address|NULL
$filter = $our->filter(function($item) use ($do) { return $item->zone->domain_id === $do->id; })->sortBy('role');
// If we are looking for a specific address, and there is only 1 result, return it, otherwise return what we have
if ($ao && config('fido.strict') && ($x=$filter->filter(function($item) use ($ao) { return $item->role <= $ao->role; })->sortBy('role'))->count())
$our = $x;
if ($ao && config('fido.strict') && ($x=$filter->filter(function($item) use ($ao) { return $item->role < $ao->role; })->sortBy('role'))->count())
$filter = $x;
return $ao ? $our->last() : ($do ? $filter : $our);
return $ao ? $filter->last() : ($do ? $filter : $our);
}
/**

View File

@ -35,5 +35,6 @@ return [
'queue_msgs' => env('FIDO_QUEUE_MSGS', 50),
// Strict mode enforces what address we present to uplinks, when we carry more than 1 address with different roles
'strict' => env('FIDO_STRICT',FALSE),
// When true, we'll only present a role that is higher than the node we are talking to
'strict' => env('FIDO_STRICT',TRUE),
];