Fix: Cache-Control-Header für PHP (no-cache) und Assets (immutable)

This commit is contained in:
fds2610-bot 2026-04-27 13:05:13 +02:00
parent c26f4debcb
commit 09eea17c4e

View file

@ -19,6 +19,16 @@
Require all denied
</Directory>
# HTML-Seiten nie cachen (damit neue ?v=-URLs sofort wirken)
<FilesMatch "\.php$">
Header set Cache-Control "no-cache, must-revalidate"
</FilesMatch>
# Statische Assets aggressiv cachen (Cache-Busting via ?v= in der URL)
<FilesMatch "\.(css|js)$">
Header set Cache-Control "public, max-age=31536000, immutable"
</FilesMatch>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>