Skip to content

EspoCRM – Open Source CRM Application

rename

Yuri Kuznetsov55c7cff79d2a
diff --git a/application/Espo/EntryPoints/Avatar.php b/application/Espo/EntryPoints/Avatar.php
index 754264b49b..b91232fd2f 100644
--- a/application/Espo/EntryPoints/Avatar.php
+++ b/application/Espo/EntryPoints/Avatar.php
@@ -150,7 +150,7 @@ class Avatar extends Image
id: $user->getAvatarId(),
size: $size,
disableAccessCheck: true,
- noCache: true,
+ noCacheHeaders: true,
);
$response->setHeader('Cache-Control', $this->composeCacheControlHeader());
diff --git a/application/Espo/EntryPoints/Image.php b/application/Espo/EntryPoints/Image.php
index e49f94c317..7db8a63f1b 100644
--- a/application/Espo/EntryPoints/Image.php
+++ b/application/Espo/EntryPoints/Image.php
@@ -90,7 +90,7 @@ class Image implements EntryPoint
string $id,
?string $size,
bool $disableAccessCheck = false,
- bool $noCache = false,
+ bool $noCacheHeaders = false,
): void {
$attachment = $this->entityManager->getRDBRepositoryByClass(Attachment::class)->getById($id);
@@ -155,7 +155,7 @@ class Image implements EntryPoint
->setHeader('Content-Length', (string) $fileSize)
->setHeader('Content-Security-Policy', "default-src 'self'");
- if (!$noCache) {
+ if (!$noCacheHeaders) {
$response->setHeader('Cache-Control', 'private, max-age=864000, immutable');
}
}