Servers is a global, don't need to hit the db again

pull/3778/head
Isaac Connor 2023-10-05 11:51:33 -04:00
parent 58ef8fe509
commit 38be4feeb8
1 changed files with 1 additions and 1 deletions

View File

@ -154,7 +154,7 @@ class AppController extends Controller {
// make sure populated user object has APIs enabled
if (isset($_SERVER['HTTP_ORIGIN'])) {
$Servers = ZM\Server::find();
global $Servers;
if ( sizeof($Servers) < 1 ) {
# Only need CORSHeaders in the event that there are multiple servers in use.
# ICON: Might not be true. multi-port?