From 8482302e4276bbc6dace06fc34fa05f8475280ec Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Tue, 16 Dec 2025 23:01:38 +0100 Subject: [PATCH] fix(lib): include headers from OC\Template\Template as well in produced HTML Otherwise we only take those added through deprecated method C_Util::addHeader, not those of OC\Template\Template::addHeader, which does nothing Signed-off-by: Thomas Citharel --- lib/private/Template/Template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/private/Template/Template.php b/lib/private/Template/Template.php index ee85562091f81..1eb731659b181 100644 --- a/lib/private/Template/Template.php +++ b/lib/private/Template/Template.php @@ -122,7 +122,7 @@ public function fetchPage(?array $additionalParams = null): string { // Add custom headers $headers = ''; - foreach (\OC_Util::$headers as $header) { + foreach (array_merge(\OC_Util::$headers, $this->headers) as $header) { $headers .= '<' . Util::sanitizeHTML($header['tag']); if (strcasecmp($header['tag'], 'script') === 0 && in_array('src', array_map('strtolower', array_keys($header['attributes'])))) { $headers .= ' defer';