Parcourir la source

correctly cache index documents

George Baugh il y a 5 mois
Parent
commit
1a837a89fd
1 fichiers modifiés avec 5 ajouts et 0 suppressions
  1. 5 0
      lib/TPSGI.pm

+ 5 - 0
lib/TPSGI.pm

@@ -1198,6 +1198,11 @@ sub save_render {
 
     return unless $path && $extension;
 
+    # If this is an index, let's make it so
+    if ($path =~ m|/$|) {
+        $path = $path.'index';
+    }
+
     # Fixup the extension if needed.
     $extension = $fixup{$extension} if exists $fixup{$extension};