Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter Anees

    (@vaneesv)

    @sstoqnov Some clients are sending requests without accept.

    Below code is logically incorrect.

    
    // Check if accept has value and the type is not text/html || */* || the user is accessing WP-ADMIN
        // Then only we set bypassCache as true else we will bypass that request and won't modify anything 
        if(
            (
                !accept &&
                !( accept.includes('text/html') || accept.includes('*/*') )
            ) ||
          requestURL.pathname.match(/^(?:\/wp-admin\/)/g)
        ) {
          bypassCache = true;
        }
    

    Please change !accept && to accept && or !accept || on cloudflare-worker.tpl line number 64

Viewing 1 replies (of 1 total)