diff --git a/includes/cli-server/router.php b/includes/cli-server/router.php index 9a8648a5b..43b38258b 100644 --- a/includes/cli-server/router.php +++ b/includes/cli-server/router.php @@ -9,6 +9,18 @@ define('DB_ENGINE', getenv('DB_ENGINE') ?: 'mysql'); +// Add a unique request ID to the headers. +$requestId = md5( microtime() ); +$_SERVER['REQUEST_ID'] = $requestId; +header( 'X-Request-ID: ' . $requestId ); + +// Disable the MU upgrade routine. +global $wp_filter; +$wp_filter['do_mu_upgrade'][10][] = [ + 'accepted_args' => 0, + 'function' => '__return_false' +]; + if ( file_exists( $root.$path ) ) { // Enforces trailing slash, keeping links tidy in the admin