Make apache_ip_binding an attribute

Signed-off-by: Pablo Zmdl <pablo@nextcloud.com>
This commit is contained in:
Pablo Zmdl 2026-01-20 12:45:00 +01:00
parent 0a22384cd9
commit 4e373cb2f8
2 changed files with 7 additions and 9 deletions

View file

@ -124,6 +124,11 @@ class ConfigurationManager
set { $this->set('borg_restore_password', $value); } set { $this->set('borg_restore_password', $value); }
} }
public string $apache_ip_binding {
get => $this->GetEnvironmentalVariableOrConfig('APACHE_IP_BINDING', 'apache_ip_binding', '');
set { $this->set('apache_ip_binding', $value); }
}
/** /**
* @throws InvalidSettingConfigurationException * @throws InvalidSettingConfigurationException
*/ */
@ -910,13 +915,6 @@ class ConfigurationManager
return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue); return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue);
} }
public function GetApacheIPBinding() : string {
$envVariableName = 'APACHE_IP_BINDING';
$configName = 'apache_ip_binding';
$defaultValue = '';
return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue);
}
private function GetDisableBackupSection() : string { private function GetDisableBackupSection() : string {
$envVariableName = 'AIO_DISABLE_BACKUP_SECTION'; $envVariableName = 'AIO_DISABLE_BACKUP_SECTION';
$configName = 'disable_backup_section'; $configName = 'disable_backup_section';

View file

@ -297,7 +297,7 @@ readonly class DockerActionManager {
} }
$ipBinding = $value->ipBinding; $ipBinding = $value->ipBinding;
if ($ipBinding === '%APACHE_IP_BINDING%') { if ($ipBinding === '%APACHE_IP_BINDING%') {
$ipBinding = $this->configurationManager->GetApacheIPBinding(); $ipBinding = $this->configurationManager->apache_ip_binding;
// Do not expose if AIO is in internal network mode // Do not expose if AIO is in internal network mode
if ($ipBinding === '@INTERNAL') { if ($ipBinding === '@INTERNAL') {
continue; continue;
@ -566,7 +566,7 @@ readonly class DockerActionManager {
'RESTORE_EXCLUDE_PREVIEWS' => $this->configurationManager->restoreExcludePreviews ? '1' : '', 'RESTORE_EXCLUDE_PREVIEWS' => $this->configurationManager->restoreExcludePreviews ? '1' : '',
'SELECTED_RESTORE_TIME' => $this->configurationManager->selectedRestoreTime, 'SELECTED_RESTORE_TIME' => $this->configurationManager->selectedRestoreTime,
'APACHE_PORT' => $this->configurationManager->GetApachePort(), 'APACHE_PORT' => $this->configurationManager->GetApachePort(),
'APACHE_IP_BINDING' => $this->configurationManager->GetApacheIPBinding(), 'APACHE_IP_BINDING' => $this->configurationManager->apache_ip_binding,
'TALK_PORT' => $this->configurationManager->GetTalkPort(), 'TALK_PORT' => $this->configurationManager->GetTalkPort(),
'TURN_DOMAIN' => $this->configurationManager->turn_domain, 'TURN_DOMAIN' => $this->configurationManager->turn_domain,
'NEXTCLOUD_MOUNT' => $this->configurationManager->GetNextcloudMount(), 'NEXTCLOUD_MOUNT' => $this->configurationManager->GetNextcloudMount(),