From b0441e5465d62b8983595cc8720130ab2353d5ff Mon Sep 17 00:00:00 2001 From: ItzNotABug Date: Sat, 3 Aug 2024 12:26:21 +0530 Subject: [PATCH] fix: domain check. --- app/controllers/api/proxy.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/proxy.php b/app/controllers/api/proxy.php index 29f39c55af..f60a639302 100644 --- a/app/controllers/api/proxy.php +++ b/app/controllers/api/proxy.php @@ -51,7 +51,7 @@ App::post('/v1/proxy/rules') } $functionsDomain = System::getEnv('_APP_DOMAIN_FUNCTIONS', ''); - if (str_ends_with($domain, $functionsDomain)) { + if ($functionsDomain != '' && str_ends_with($domain, $functionsDomain)) { throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'You cannot assign your functions domain or it\'s subdomain to specific resource. Please use different domain.'); }