disable https for tests

Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
pull/1785/head
Maxence Lange 2023-06-14 11:47:26 -01:00
rodzic c53e47cfa9
commit 9f53a50ee0
1 zmienionych plików z 4 dodań i 1 usunięć

Wyświetl plik

@ -62,7 +62,7 @@ class ConfigService {
public const SOCIAL_ACCESS_LIST = 'access_list';
public const SOCIAL_SELF_SIGNED = 'allow_self_signed';
public const SOCIAL_DISABLE_HTTPS = 'disable_https';
public const BACKGROUND_CRON = 1;
public const BACKGROUND_ASYNC = 2;
@ -414,6 +414,9 @@ class ConfigService {
public function configureRequest(NCRequest $request): void {
$request->setVerifyPeer($this->getAppValue(ConfigService::SOCIAL_SELF_SIGNED) !== '1');
if ($this->getAppValue(ConfigService::SOCIAL_DISABLE_HTTPS) === 'yes_i_only_run_test') {
$request->setProtocols(['http']);
}
// do not add json headers if required
if (!$this->getBool('ignoreJsonHeaders', $request->getClientOptions())) {