File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -486,9 +486,15 @@ function powered_cache_serve_cache() {
486486 }
487487
488488 // trailingslash check
489- if ( isset ( $ powered_cache_slash_check ) && $ powered_cache_slash_check ) {
489+ if ( isset ( $ powered_cache_slash_check ) ) {
490490 $ current_path = parse_url ( $ _SERVER ['REQUEST_URI ' ], PHP_URL_PATH );
491- if ( ! empty ( $ current_path ) && '/ ' !== substr ( $ current_path , - 1 ) ) {
491+ if ( $ powered_cache_slash_check && ! empty ( $ current_path ) && '/ ' !== substr ( $ current_path , - 1 ) ) {
492+ header ( 'X-Powered-Cache: Passing to WordPress ' );
493+
494+ return ;
495+ }
496+
497+ if ( ! $ powered_cache_slash_check && ! empty ( $ current_path ) && '/ ' === substr ( $ current_path , - 1 ) ) {
492498 header ( 'X-Powered-Cache: Passing to WordPress ' );
493499
494500 return ;
You can’t perform that action at this time.
0 commit comments