diff --git a/app/controllers/api/health.php b/app/controllers/api/health.php index 32b77433f0..975db909c6 100644 --- a/app/controllers/api/health.php +++ b/app/controllers/api/health.php @@ -23,10 +23,12 @@ use Utopia\Storage\Device; use Utopia\Storage\Device\Local; use Utopia\Storage\Storage; use Utopia\System\System; +use Utopia\Validator\AnyOf; use Utopia\Validator\Domain; use Utopia\Validator\Integer; use Utopia\Validator\Multiple; use Utopia\Validator\Text; +use Utopia\Validator\URL; use Utopia\Validator\WhiteList; App::get('/v1/health') @@ -397,7 +399,7 @@ App::get('/v1/health/certificate') ], contentType: ContentType::JSON )) - ->param('domain', null, new Multiple([new Domain(), new PublicDomain()]), Multiple::TYPE_STRING, 'Domain name') + ->param('domain', null, new Multiple([new AnyOf([new URL(), new Domain()]), new PublicDomain()]), Multiple::TYPE_STRING, 'Domain name') ->inject('response') ->action(function (string $domain, Response $response) { if (filter_var($domain, FILTER_VALIDATE_URL)) { diff --git a/composer.lock b/composer.lock index 0855905a4a..922f5bf5ee 100644 --- a/composer.lock +++ b/composer.lock @@ -3852,16 +3852,16 @@ }, { "name": "utopia-php/framework", - "version": "0.33.20", + "version": "0.33.21", "source": { "type": "git", "url": "https://github.com/utopia-php/http.git", - "reference": "e1c7ab4e0b5b0a9a70256b1e00912e101e76a131" + "reference": "eb0e82e90b8fa493f99b8d131bdd25173422c493" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/http/zipball/e1c7ab4e0b5b0a9a70256b1e00912e101e76a131", - "reference": "e1c7ab4e0b5b0a9a70256b1e00912e101e76a131", + "url": "https://api.github.com/repos/utopia-php/http/zipball/eb0e82e90b8fa493f99b8d131bdd25173422c493", + "reference": "eb0e82e90b8fa493f99b8d131bdd25173422c493", "shasum": "" }, "require": { @@ -3893,9 +3893,9 @@ ], "support": { "issues": "https://github.com/utopia-php/http/issues", - "source": "https://github.com/utopia-php/http/tree/0.33.20" + "source": "https://github.com/utopia-php/http/tree/0.33.21" }, - "time": "2025-05-18T23:51:21+00:00" + "time": "2025-08-19T10:52:15+00:00" }, { "name": "utopia-php/image", @@ -8426,5 +8426,5 @@ "platform-overrides": { "php": "8.3" }, - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.3.0" } diff --git a/tests/e2e/Services/Proxy/ProxyCustomServerTest.php b/tests/e2e/Services/Proxy/ProxyCustomServerTest.php index ea310d5449..da23b9ab7c 100644 --- a/tests/e2e/Services/Proxy/ProxyCustomServerTest.php +++ b/tests/e2e/Services/Proxy/ProxyCustomServerTest.php @@ -109,15 +109,11 @@ class ProxyCustomServerTest extends Scope $rule = $this->createAPIRule('https://' . $domain); $this->assertEquals(400, $rule['headers']['status-code']); - // Unexpected I would say, but it is the current behaviour $rule = $this->createAPIRule('wss://' . $domain); - $this->assertEquals(201, $rule['headers']['status-code']); - $this->cleanupRule($rule['body']['$id']); + $this->assertEquals(400, $rule['headers']['status-code']); - // Unexpected I would say, but it is the current behaviour $rule = $this->createAPIRule($domain . '/some-path'); - $this->assertEquals(201, $rule['headers']['status-code']); - $this->cleanupRule($rule['body']['$id']); + $this->assertEquals(400, $rule['headers']['status-code']); } public function testCreateRedirectRule(): void