From 5808186afcf28367dcadf8867df8f6365e0a41ea Mon Sep 17 00:00:00 2001 From: mstfyldz Date: Tue, 5 May 2026 00:07:18 +0300 Subject: [PATCH] fix: force caching headers for CSS and JS files with version strings --- Dockerfile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index dba3793..818bd3a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ FROM php:8.2-apache # Modülleri aktif et RUN a2enmod rewrite expires deflate headers -# Apache Site Konfigürasyonunu doğrudan güncelle (Header ve Önbellek zorlaması) +# Apache Site Konfigürasyonunu doğrudan güncelle (CSS ve JS zorlaması ile) RUN echo '\n\ DocumentRoot /var/www/html\n\ \n\ @@ -19,11 +19,13 @@ RUN echo '\n\ ExpiresByType image/png "access plus 1 year"\n\ ExpiresByType image/webp "access plus 1 year"\n\ ExpiresByType font/woff2 "access plus 1 year"\n\ - ExpiresByType text/css "access plus 1 month"\n\ - ExpiresByType application/javascript "access plus 1 month"\n\ + ExpiresByType text/css "access plus 1 year"\n\ + ExpiresByType application/javascript "access plus 1 year"\n\ \n\ \n\ - Header set Cache-Control "max-age=31536000, public"\n\ + \n\ + Header set Cache-Control "max-age=31536000, public, immutable"\n\ + \n\ \n\ ' > /etc/apache2/sites-available/000-default.conf