]> git.openstreetmap.org Git - chef.git/commitdiff
Only set a long expiry on assets which exist
authorTom Hughes <tom@compton.nu>
Thu, 15 Aug 2024 17:11:53 +0000 (18:11 +0100)
committerTom Hughes <tom@compton.nu>
Thu, 15 Aug 2024 17:11:53 +0000 (18:11 +0100)
cookbooks/web/templates/default/apache.frontend.erb

index 9a2cd10a7c64bec52f5f03df2801bfb72482121b..39f2a6007118589c89b429af84ad23ca7087bb79 100644 (file)
@@ -123,7 +123,7 @@ ErrorLog /var/log/apache2/error.log
     FileETag Size
 
     ExpiresDefault "access plus 1 year"
-    Header set Cache-Control "immutable, max-age=31536000"
+    Header set Cache-Control "immutable, max-age=31536000" "expr=%{REQUEST_STATUS} == 200"
   </Location>
 
   #