Skip to content

Commit

Permalink
Servers is a global, don't need to hit the db again
Browse files Browse the repository at this point in the history
  • Loading branch information
Isaac Connor committed Oct 5, 2023
1 parent 58ef8fe commit 38be4fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/api/app/Controller/AppController.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public function beforeFilter() {
// 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?
Expand Down

0 comments on commit 38be4fe

Please sign in to comment.