diff --git a/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php index 34180b2c257..9ddfb0f46b8 100644 --- a/core/lib/Drupal/Core/DrupalKernel.php +++ b/core/lib/Drupal/Core/DrupalKernel.php @@ -1561,7 +1561,7 @@ class DrupalKernel implements DrupalKernelInterface, TerminableInterface { * @see \Drupal\Core\Http\TrustedHostsRequestFactory */ protected static function setupTrustedHosts(Request $request, $host_patterns) { - $request->setTrustedHosts($host_patterns); + Request::setTrustedHosts($host_patterns); // Get the host, which will validate the current request. try {