Always add auth_relay info to status requests

pull/4073/head
Isaac Connor 2024-06-06 18:10:23 -04:00
parent ad6a8c376b
commit 51ad77c6b9
1 changed files with 5 additions and 5 deletions

View File

@ -409,11 +409,6 @@ function collectData() {
ZM\Debug("No fieldSQL");
}
//ZM\Debug(print_r($data, true));
if ( ZM_OPT_USE_AUTH && (ZM_AUTH_RELAY == 'hashed') ) {
$auth_hash = generateAuthHash(ZM_AUTH_HASH_IPS);
$data['auth'] = $auth_hash;
$data['auth_relay'] = get_auth_relay();
}
return $data;
}
@ -445,6 +440,11 @@ switch ( $_REQUEST['layout'] ) {
case 'json' :
{
$response = array( strtolower(validJsStr($_REQUEST['entity'])) => $data );
if ( ZM_OPT_USE_AUTH && (ZM_AUTH_RELAY == 'hashed') ) {
$auth_hash = generateAuthHash(ZM_AUTH_HASH_IPS);
$response['auth'] = $auth_hash;
$response['auth_relay'] = get_auth_relay();
}
if ( isset($_REQUEST['loopback']) )
$response['loopback'] = validJsStr($_REQUEST['loopback']);
#ZM\Warning(print_r($response, true));