/** * Implements hook_http_client_middleware_alter(). * Forces Drupal to reject outgoing requests to if-cdn/iframely cloud servers. */ function my_gutenberg_fix_http_client_middleware_alter(array &$middleware) { $middleware['stop_gutenberg_cloud_proxy'] = function () { return function (callable $handler) { return function ( \Psr\Http\Message\RequestInterface $request, array $options ) use ($handler) { $host = $request->getUri()->getHost(); // If Gutenberg tries to phone home to the proxy CDN, break the connection if (str_contains($host, 'if-cdn.com') || str_contains($host, 'iframely.com')) { return new \GuzzleHttp\Promise\RejectedPromise( new \GuzzleHttp\Exception\ConnectException('Gutenberg Cloud Proxy Disabled', $request) ); } return $handler($request, $options); }; }; }; } neustart | Stadtfabrikanten e.V.