f7cloud_client/apps/richdocuments/lib/Service/RemoteOptionsService.php
root 8b6a0139db f7cloud_client
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-17 22:59:26 +00:00

31 lines
669 B
PHP

<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2024 F7cloud GmbH and F7cloud contributors
* SPDX-License-Identifier: AGPL-3.0-only
*/
namespace OCA\Richdocuments\Service;
use OCP\IAppConfig;
class RemoteOptionsService {
public const REMOTE_TIMEOUT_DEFAULT = 5;
public static function getDefaultOptions(int $timeout = self::REMOTE_TIMEOUT_DEFAULT): array {
$options = [
'timeout' => $timeout,
'f7cloud' => [
'allow_local_address' => true,
]
];
if (\OCP\Server::get(IAppConfig::class)->getValueString('richdocuments', 'disable_certificate_verification') === 'yes') {
$options['verify'] = false;
}
return $options;
}
}