From 330c96feb01c4ea0da5f679f5af8d15743639860 Mon Sep 17 00:00:00 2001 From: Alexander Piskun <13381981+bigcat88@users.noreply.github.com> Date: Thu, 8 Aug 2024 10:41:28 +0300 Subject: [PATCH] Proxy: do not set timeout for requests to ExApp Signed-off-by: Alexander Piskun --- lib/Controller/ExAppProxyController.php | 4 ++++ tests/psalm-baseline.xml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/lib/Controller/ExAppProxyController.php b/lib/Controller/ExAppProxyController.php index 78be5321..6aceda99 100644 --- a/lib/Controller/ExAppProxyController.php +++ b/lib/Controller/ExAppProxyController.php @@ -91,6 +91,7 @@ public function ExAppGet(string $appId, string $other): Response { $exApp, '/' . $other, $this->userId, 'GET', queryParams: $_GET, options: [ RequestOptions::COOKIES => $this->buildProxyCookiesJar($_COOKIE, $this->service->getExAppDomain($exApp)), RequestOptions::HEADERS => $this->buildHeadersWithExclude($exApp, $other, getallheaders()), + RequestOptions::TIMEOUT => 0, ], request: $this->request, ); @@ -112,6 +113,7 @@ public function ExAppPost(string $appId, string $other): Response { $options = [ RequestOptions::COOKIES => $this->buildProxyCookiesJar($_COOKIE, $this->service->getExAppDomain($exApp)), RequestOptions::HEADERS => $this->buildHeadersWithExclude($exApp, $other, getallheaders()), + RequestOptions::TIMEOUT => 0, ]; if (str_starts_with($this->request->getHeader('Content-Type'), 'multipart/form-data') || count($_FILES) > 0) { unset($options['headers']['Content-Type']); @@ -149,6 +151,7 @@ public function ExAppPut(string $appId, string $other): Response { RequestOptions::COOKIES => $this->buildProxyCookiesJar($_COOKIE, $this->service->getExAppDomain($exApp)), RequestOptions::BODY => $stream, RequestOptions::HEADERS => $this->buildHeadersWithExclude($exApp, $other, getallheaders()), + RequestOptions::TIMEOUT => 0, ]; $response = $this->service->requestToExApp2( $exApp, '/' . $other, $this->userId, 'PUT', @@ -175,6 +178,7 @@ public function ExAppDelete(string $appId, string $other): Response { RequestOptions::COOKIES => $this->buildProxyCookiesJar($_COOKIE, $this->service->getExAppDomain($exApp)), RequestOptions::BODY => $stream, RequestOptions::HEADERS => $this->buildHeadersWithExclude($exApp, $other, getallheaders()), + RequestOptions::TIMEOUT => 0, ]; $response = $this->service->requestToExApp2( $exApp, '/' . $other, $this->userId, 'DELETE', diff --git a/tests/psalm-baseline.xml b/tests/psalm-baseline.xml index 6f22d8aa..7420c1a8 100644 --- a/tests/psalm-baseline.xml +++ b/tests/psalm-baseline.xml @@ -26,6 +26,10 @@ + + + +