Skip to content

Commit 1b1aea4

Browse files
tcitworldbackportbot[bot]
authored andcommitted
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 <[email protected]>
1 parent f8033d9 commit 1b1aea4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/private/Template/Template.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public function fetchPage(?array $additionalParams = null): string {
122122

123123
// Add custom headers
124124
$headers = '';
125-
foreach (\OC_Util::$headers as $header) {
125+
foreach (array_merge(\OC_Util::$headers, $this->headers) as $header) {
126126
$headers .= '<' . Util::sanitizeHTML($header['tag']);
127127
if (strcasecmp($header['tag'], 'script') === 0 && in_array('src', array_map('strtolower', array_keys($header['attributes'])))) {
128128
$headers .= ' defer';

0 commit comments

Comments
 (0)