diff options
author | Maxence Lange <maxence@artificial-owl.com> | 2023-06-14 11:47:26 -0100 |
---|---|---|
committer | Maxence Lange <maxence@artificial-owl.com> | 2023-06-14 11:47:26 -0100 |
commit | 9f53a50ee0d3d6b6bee7d7203f14acf2c2b0791e (patch) | |
tree | 2401042fc4cad2ea92274b7174b8cab11a6980ef | |
parent | c53e47cfa95d8a396bbcbf723986d32cc76974c6 (diff) |
disable https for testsenh/noid/disable-https-option
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
-rw-r--r-- | lib/Service/ConfigService.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Service/ConfigService.php b/lib/Service/ConfigService.php index 033990b7..25031115 100644 --- a/lib/Service/ConfigService.php +++ b/lib/Service/ConfigService.php @@ -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())) { |