Skip to content

Commit

Permalink
Fix: Expiration by path was too broad and expired all paths
Browse files Browse the repository at this point in the history
  • Loading branch information
kovshenin committed Feb 3, 2024
1 parent 4e0b5ac commit 4e7a6fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/serve.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

// Invalidate by path.
if ( substr( $flag, 0, 1 ) == '/' ) {
if ( substr( $meta['path'], 0, strlen( $flag ) ) ) {
if ( substr( $meta['path'], 0, strlen( $flag ) ) === $flag ) {
header( 'X-Cache: expired' );
fclose( $f );
return;
Expand Down

0 comments on commit 4e7a6fe

Please sign in to comment.