Aggiunta cache al caricamento delle immagini
All checks were successful
Deploy / trigger (push) Successful in 2s

This commit is contained in:
2026-04-12 21:16:30 +02:00
parent 8cd10b102b
commit fc5999f50a
2 changed files with 6 additions and 0 deletions

View File

@@ -35,6 +35,11 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$imageData = curl_exec($downloadImg);
$contentType = curl_getinfo($downloadImg, CURLINFO_CONTENT_TYPE);
header("Content-Type: " . $contentType);
$etag = md5($imageData);
header("ETag: \"$etag\"");
header("Cache-Control: public, max-age=604800");
echo $imageData;
} else {
header("Content-Type: image/png");

View File

@@ -148,6 +148,7 @@ header .container {
footer .container {
padding: 2rem 0;
padding-top: 4rem;
text-align: center;
opacity: 0.8;
font-size: 90%;