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); }
}
public string $apache_ip_binding {
get => $this->GetEnvironmentalVariableOrConfig('APACHE_IP_BINDING', 'apache_ip_binding', '');
set { $this->set('apache_ip_binding', $value); }
}
/**
* @throws InvalidSettingConfigurationException
*/
@ -910,13 +915,6 @@ class ConfigurationManager
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 {
$envVariableName = 'AIO_DISABLE_BACKUP_SECTION';
$configName = 'disable_backup_section';

View file

@ -297,7 +297,7 @@ readonly class DockerActionManager {
}
$ipBinding = $value->ipBinding;
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
if ($ipBinding === '@INTERNAL') {
continue;
@ -566,7 +566,7 @@ readonly class DockerActionManager {
'RESTORE_EXCLUDE_PREVIEWS' => $this->configurationManager->restoreExcludePreviews ? '1' : '',
'SELECTED_RESTORE_TIME' => $this->configurationManager->selectedRestoreTime,
'APACHE_PORT' => $this->configurationManager->GetApachePort(),
'APACHE_IP_BINDING' => $this->configurationManager->GetApacheIPBinding(),
'APACHE_IP_BINDING' => $this->configurationManager->apache_ip_binding,
'TALK_PORT' => $this->configurationManager->GetTalkPort(),
'TURN_DOMAIN' => $this->configurationManager->turn_domain,
'NEXTCLOUD_MOUNT' => $this->configurationManager->GetNextcloudMount(),