Skip to content

Commit

Permalink
fix(includes/cli-server) mark requests, disable the MU upgrade routing
Browse files Browse the repository at this point in the history
  • Loading branch information
lucatume committed Mar 7, 2024
1 parent b3d96d1 commit f63f1e5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions includes/cli-server/router.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f63f1e5

Please sign in to comment.