From a16a13b3955c405386072f97ce28755e450ecac4 Mon Sep 17 00:00:00 2001 From: ghost Date: Tue, 25 Apr 2023 20:25:12 +0300 Subject: [PATCH] add application mode settings --- config/app.php.txt | 11 +++++++++++ public/api.php | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/config/app.php.txt b/config/app.php.txt index 73a60bc..9f189c4 100644 --- a/config/app.php.txt +++ b/config/app.php.txt @@ -15,6 +15,17 @@ error_reporting(E_ALL); */ define('APPLICATION_NAME', 'My YGGo host'); +/* + * Application mode + * + * FEDERATIVE - crawl and share distributed index from other YGGo nodes running on same API version + * LOCAL - encapsulated web search portal + * + * see also: API_ENABLED, API_MANIFEST_ENABLED settings + * + */ +define('APPLICATION_MODE', 'FEDERATIVE'); + // Website /* diff --git a/public/api.php b/public/api.php index 5a10776..a40b89f 100644 --- a/public/api.php +++ b/public/api.php @@ -100,8 +100,8 @@ if (API_ENABLED) { 'status' => true, 'result' => [ 'applicationName' => APPLICATION_NAME, - - 'websiteDomain' => WEBSITE_DOMAIN, + 'applicationMode' => APPLICATION_MODE, + 'applicationUrl' => WEBSITE_DOMAIN, 'crawlUrlRegexp' => CRAWL_URL_REGEXP,