hi,
Problem/Motivation
My problem is if you create rest endpoint and try to load the url from a file via \Drupal::service('file_url_generator')->generateAbsoluteString() and you use a Drupal\rest\ResourceResponse as response.
you get the following error:
Uncaught PHP Exception LogicException: "The controller result claims to be providing relevant cache metadata, but leaked metadata was detected. Please ensure you are not rendering content too early. Returned object class: Drupal\rest\ResourceResponse." at /app/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php line 154
Steps to reproduce
config:
$schemes['s3'] = [
'driver' => 's3',
'config' => [
'key' => '',
'secret' => '',
'region' => '',
'bucket' => '',
'endpoint' => "",
'protocol' => "https",
'cname_is_bucket' => FALSE,
"cname" => "",
'use_path_style_endpoint' => TRUE,
'public' => FALSE,
'options' => [
'ACL' => 'private',
'@http' => [
'stream' => false,
]
]
],
'cache' => TRUE,
'serve_js' => TRUE,
'serve_css' => TRUE,
];
Proposed resolution
The problem is more or less the same as in https://git.drupalcode.org/project/web_push_api/-/commit/40e8317231aaef6....