mirror of
https://github.com/YGGverse/YGGo.git
synced 2025-01-08 22:07:56 +00:00
update manifest API
This commit is contained in:
parent
eb3e70a7b7
commit
219a56d6cd
@ -41,27 +41,6 @@ ini_set('display_errors', '1');
|
|||||||
ini_set('display_startup_errors', '1');
|
ini_set('display_startup_errors', '1');
|
||||||
error_reporting(E_ALL);
|
error_reporting(E_ALL);
|
||||||
|
|
||||||
// Application
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Unique project name
|
|
||||||
*
|
|
||||||
* using to ident the app in the YGGo ecosystem
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
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
|
// Website
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
// Current version
|
// Current version
|
||||||
define('API_VERSION', 0.1);
|
define('API_VERSION', 0.2);
|
||||||
|
|
||||||
// Load system dependencies
|
// Load system dependencies
|
||||||
require_once('../config/app.php');
|
require_once('../config/app.php');
|
||||||
@ -100,27 +100,23 @@ if (API_ENABLED) {
|
|||||||
$response = [
|
$response = [
|
||||||
'status' => true,
|
'status' => true,
|
||||||
'result' => [
|
'result' => [
|
||||||
'applicationName' => APPLICATION_NAME,
|
'config' => [
|
||||||
'applicationMode' => APPLICATION_MODE,
|
'websiteDomain' => WEBSITE_DOMAIN,
|
||||||
'applicationUrl' => WEBSITE_DOMAIN,
|
'crawlUrlRegexp' => CRAWL_URL_REGEXP,
|
||||||
|
'crawlHostDefaultPagesLimit' => CRAWL_HOST_DEFAULT_PAGES_LIMIT,
|
||||||
'crawlUrlRegexp' => CRAWL_URL_REGEXP,
|
'crawlHostDefaultStatus' => CRAWL_HOST_DEFAULT_STATUS,
|
||||||
|
'crawlHostDefaultMetaOnly' => CRAWL_HOST_DEFAULT_META_ONLY,
|
||||||
'crawlHostDefaultPagesLimit' => CRAWL_HOST_DEFAULT_PAGES_LIMIT,
|
'crawlHostPageSecondsOffset' => CRAWL_PAGE_SECONDS_OFFSET,
|
||||||
'crawlHostDefaultStatus' => CRAWL_HOST_DEFAULT_STATUS,
|
'cleanHostSecondsOffset' => CLEAN_HOST_SECONDS_OFFSET,
|
||||||
'crawlHostDefaultMetaOnly' => CRAWL_HOST_DEFAULT_META_ONLY,
|
'crawlRobotsDefaultRules' => CRAWL_ROBOTS_DEFAULT_RULES,
|
||||||
|
'crawlRobotsPostfixRules' => CRAWL_ROBOTS_POSTFIX_RULES,
|
||||||
'crawlHostPageSecondsOffset' => CRAWL_PAGE_SECONDS_OFFSET,
|
],
|
||||||
'cleanHostSecondsOffset' => CLEAN_HOST_SECONDS_OFFSET,
|
'api' => [
|
||||||
|
'version' => API_VERSION,
|
||||||
'crawlRobotsDefaultRules' => CRAWL_ROBOTS_DEFAULT_RULES,
|
'manifest' => API_ENABLED && API_MANIFEST_ENABLED ? WEBSITE_DOMAIN . '/api.php?action=manifest' : false,
|
||||||
'crawlRobotsPostfixRules' => CRAWL_ROBOTS_POSTFIX_RULES,
|
'search' => API_ENABLED && API_SEARCH_ENABLED ? WEBSITE_DOMAIN . '/api.php?action=search' : false,
|
||||||
|
'hosts' => API_ENABLED && API_HOSTS_ENABLED ? WEBSITE_DOMAIN . '/api.php?action=hosts' : false,
|
||||||
'apiVersion' => API_VERSION,
|
]
|
||||||
|
|
||||||
'apiEnabled' => API_ENABLED,
|
|
||||||
'apiSearchEnabled' => API_SEARCH_ENABLED,
|
|
||||||
'apiHostsEnabled' => API_HOSTS_ENABLED,
|
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user