|
|
@ -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, |
|
|
|
'crawlUrlRegexp' => CRAWL_URL_REGEXP, |
|
|
|
|
|
|
|
|
|
|
|
'crawlHostDefaultPagesLimit' => CRAWL_HOST_DEFAULT_PAGES_LIMIT, |
|
|
|
'crawlHostDefaultPagesLimit' => CRAWL_HOST_DEFAULT_PAGES_LIMIT, |
|
|
|
'crawlHostDefaultStatus' => CRAWL_HOST_DEFAULT_STATUS, |
|
|
|
'crawlHostDefaultStatus' => CRAWL_HOST_DEFAULT_STATUS, |
|
|
|
'crawlHostDefaultMetaOnly' => CRAWL_HOST_DEFAULT_META_ONLY, |
|
|
|
'crawlHostDefaultMetaOnly' => CRAWL_HOST_DEFAULT_META_ONLY, |
|
|
|
|
|
|
|
|
|
|
|
'crawlHostPageSecondsOffset' => CRAWL_PAGE_SECONDS_OFFSET, |
|
|
|
'crawlHostPageSecondsOffset' => CRAWL_PAGE_SECONDS_OFFSET, |
|
|
|
'cleanHostSecondsOffset' => CLEAN_HOST_SECONDS_OFFSET, |
|
|
|
'cleanHostSecondsOffset' => CLEAN_HOST_SECONDS_OFFSET, |
|
|
|
|
|
|
|
|
|
|
|
'crawlRobotsDefaultRules' => CRAWL_ROBOTS_DEFAULT_RULES, |
|
|
|
'crawlRobotsDefaultRules' => CRAWL_ROBOTS_DEFAULT_RULES, |
|
|
|
'crawlRobotsPostfixRules' => CRAWL_ROBOTS_POSTFIX_RULES, |
|
|
|
'crawlRobotsPostfixRules' => CRAWL_ROBOTS_POSTFIX_RULES, |
|
|
|
|
|
|
|
], |
|
|
|
'apiVersion' => API_VERSION, |
|
|
|
'api' => [ |
|
|
|
|
|
|
|
'version' => API_VERSION, |
|
|
|
'apiEnabled' => API_ENABLED, |
|
|
|
'manifest' => API_ENABLED && API_MANIFEST_ENABLED ? WEBSITE_DOMAIN . '/api.php?action=manifest' : false, |
|
|
|
'apiSearchEnabled' => API_SEARCH_ENABLED, |
|
|
|
'search' => API_ENABLED && API_SEARCH_ENABLED ? WEBSITE_DOMAIN . '/api.php?action=search' : false, |
|
|
|
'apiHostsEnabled' => API_HOSTS_ENABLED, |
|
|
|
'hosts' => API_ENABLED && API_HOSTS_ENABLED ? WEBSITE_DOMAIN . '/api.php?action=hosts' : false, |
|
|
|
|
|
|
|
] |
|
|
|
], |
|
|
|
], |
|
|
|
]; |
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|