Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorPeter Zhang <peter@innocraft.com>2022-03-17 04:40:18 +0300
committerGitHub <noreply@github.com>2022-03-17 04:40:18 +0300
commit74e0ace978ad62c879abc736cdd1fca3894db5d3 (patch)
treee725bb0ac94523f6e2a75d06fae146d14478ebe3 /core
parent39d5fbab4aaf6c4728ba4b42ed818bb4652f4f68 (diff)
With multi_server_environment enable maintain won't send 503 as response (#18862)
* Update FrontController.php update multi_server_environment is set wont return 503 * Update FrontController.php update only response 503 * Update FrontController.php using GeneralConfig * Update global.ini.php append maintenance mode response code * Update global.ini.php update comments of multi_server_environment
Diffstat (limited to 'core')
-rw-r--r--core/FrontController.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/core/FrontController.php b/core/FrontController.php
index 97f7d47eb6..3227ffa330 100644
--- a/core/FrontController.php
+++ b/core/FrontController.php
@@ -11,6 +11,7 @@ namespace Piwik;
use Exception;
use Piwik\API\Request;
+use Piwik\Config\GeneralConfig;
use Piwik\Container\StaticContainer;
use Piwik\DataTable\Manager;
use Piwik\Exception\AuthenticationFailedException;
@@ -493,10 +494,14 @@ class FrontController extends Singleton
protected function handleMaintenanceMode()
{
- if ((Config::getInstance()->General['maintenance_mode'] != 1) || Common::isPhpCliMode()) {
+ if ((GeneralConfig::getConfigValue('maintenance_mode') != 1) || Common::isPhpCliMode() ) {
return;
}
- Common::sendResponseCode(503);
+
+ // as request matomo behind load balancer should not return 503. https://github.com/matomo-org/matomo/issues/18054
+ if (GeneralConfig::getConfigValue('multi_server_environment') != 1) {
+ Common::sendResponseCode(503);
+ }
$logoUrl = 'plugins/Morpheus/images/logo.svg';
$faviconUrl = 'plugins/CoreHome/images/favicon.png';