diff options
Diffstat (limited to 'modules-available/webinterface/inc/webinterface.inc.php')
-rw-r--r-- | modules-available/webinterface/inc/webinterface.inc.php | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/modules-available/webinterface/inc/webinterface.inc.php b/modules-available/webinterface/inc/webinterface.inc.php index 035b94e6..d50acd50 100644 --- a/modules-available/webinterface/inc/webinterface.inc.php +++ b/modules-available/webinterface/inc/webinterface.inc.php @@ -88,7 +88,7 @@ class WebInterface return; } if (Taskmanager::isFailed($task)) { - EventLog::failure($data['message'], json_encode($task, JSON_PRETTY_PRINT)); + EventLog::failure('TASK FAILED: ' . $data['message'], print_r($task, true)); return; } EventLog::info($data['message']); @@ -97,19 +97,10 @@ class WebInterface public static function tmDisableHttps(): ?string { - Property::set(WebInterface::PROP_HSTS, 'off'); - $task = Taskmanager::submit('LighttpdHttps', []); - self::registerCallback($task, 'off', 'HTTPS disabled'); - return $task['id'] ?? null; - } - - public static function tmGenerateRandomCert(): ?string - { $task = Taskmanager::submit('LighttpdHttps', [ - 'proxyip' => Property::getServerIp(), 'redirect' => self::isHttpsRedirectEnabled(), ]); - self::registerCallback($task, 'generated', 'Self-signed HTTPS certificate generated'); + self::registerCallback($task, 'off', 'Disabling HTTPS, switching to self-signed certificate'); return $task['id'] ?? null; } @@ -117,7 +108,6 @@ class WebInterface { $key = preg_replace('/[\r\n]+/', "\n", $key); $cert = preg_replace('/[\r\n]+/', "\n", $cert); - Property::set(WebInterface::PROP_TYPE, $type); $task = Taskmanager::submit('LighttpdHttps', [ 'importcert' => $cert, 'importkey' => $key, @@ -129,8 +119,6 @@ class WebInterface public static function tmSetHttpRedirectMode(): ?string { - if (Property::get(WebInterface::PROP_TYPE) === 'off') - return null; $task = Taskmanager::submit('LighttpdHttps', array( 'redirectOnly' => true, 'redirect' => self::isHttpsRedirectEnabled(), |