• Resolved Emre Vona

    (@emrevona)


    Hi Wordfence, I have a problem with your plugin. I have developed a cache plugin for wordpress (wp fastest cache). My and your plugin cannot work together.

    Problem; When “If anyone’s requests exceed:” is set, “Your access to this site has been limited” page is shown and this error page is cached.

    Fix; I need to get header of page. if(httpStatus == 503){ //not cache } , I will do something like that. Can you help me about it? How can I detect the header of page?

    https://www.ads-software.com/plugins/wordfence/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Wordfence Security

    (@mmaunder)

    Hi Emre,

    In your code you can check if we have set DONOTCACHEPAGE, DONOTCACHEDB, DONOTCDN or DONOTCACHEOBJECT. We set these to indicate to other plugins like WP total cache to not cache pages. The actual code in Wordfence is as follows:

    public static function doNotCache(){
                    header("Cache-Control: no-cache, must-revalidate");
                    header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); //In the past
                    define('DONOTCACHEPAGE', true);
                    define('DONOTCACHEDB', true);
                    define('DONOTCDN', true);
                    define('DONOTCACHEOBJECT', true);
    
            }
    Thread Starter Emre Vona

    (@emrevona)

    Thank you so much ?? I have implemented it and WP Fastest Cache works wirg Wordfence properly

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Getting HTTP response code’ is closed to new replies.