Title: Bug report for cache_controller.class.php
Last modified: October 31, 2024

---

# Bug report for cache_controller.class.php

 *  [p15h](https://wordpress.org/support/users/prestonwordsworth/)
 * (@prestonwordsworth)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/bug-report-for-cache_controller-class-php/)
 *     ```wp-block-code
       1484	                // Bypass sitemap1485	                if ( $this->main_instance->get_single_config( 'cf_bypass_sitemap', 0 ) > 0 && strcasecmp( $_SERVER['REQUEST_URI'], '/sitemap_index.xml' ) == 0 || preg_match( '/[a-zA-Z0-9]-sitemap.xml$/', $_SERVER['REQUEST_URI'] ) ) {1486	                        Helpers::bypass_reason_header( 'Sitemap' );1487	1488	                        return true;1489	                }
       ```
   
 * In the `if` statement, because `&&` has precedence over `||`, the code actually
   bypasses `wp-sitemap.xml` regardless of whether `cf_bypass_sitemap` is set. What’s
   needed here is
 *     ```wp-block-code
       if ( $this->main_instance->get_single_config( 'cf_bypass_sitemap', 0 ) > 0 && ( strcasecmp( $_SERVER['REQUEST_URI'], '/sitemap_index.xml' ) == 0 || preg_match( '/[a-zA-Z0-9]-sitemap.xml$/', $_SERVER['REQUEST_URI'] ) ) ) {}
       ```
   

Viewing 1 replies (of 1 total)

 *  Plugin Support [Andrei Baicus](https://wordpress.org/support/users/baicusandrei/)
 * (@baicusandrei)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/bug-report-for-cache_controller-class-php/#post-18108122)
 * [@prestonwordsworth](https://wordpress.org/support/users/prestonwordsworth/) 
   thanks for reporting this. We’ll include the fix in our next release!
 * Have a great rest of the week!

Viewing 1 replies (of 1 total)

The topic ‘Bug report for cache_controller.class.php’ is closed to new replies.

 * ![](https://ps.w.org/wp-cloudflare-page-cache/assets/icon-256x256.gif?rev=3234997)
 * [Super Page Cache – Cloudflare Cache, Page Speed & Core Web Vitals](https://wordpress.org/plugins/wp-cloudflare-page-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-cloudflare-page-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-cloudflare-page-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-cloudflare-page-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-cloudflare-page-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-cloudflare-page-cache/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Andrei Baicus](https://wordpress.org/support/users/baicusandrei/)
 * Last activity: [1 year, 7 months ago](https://wordpress.org/support/topic/bug-report-for-cache_controller-class-php/#post-18108122)
 * Status: not a support question