• Resolved lookingahead

    (@lookingahead)


    Hi, I just changed my login screen with another plugin. The plugin said that if I had a caching plugin on my site that I needed to “whitelist” the login page to avoid it being picked up by attackers. I went to the Autoptimize ‘options’ and saw no option to prevent the login screen from being cached. How would I whitelist my new custom login page to prevent it from being cached by Autoptimize?

Viewing 1 replies (of 1 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    well, first of all AO is not a (page) caching plugin, so it might not be needed to exclude that page from autoptimization.

    if you do want to, you can use this code snippet to exclude a page on e.g. https://yoursite.com/myspecialloginpage;

    add_filter('autoptimize_filter_noptimize','noptimize_login',10,0);
    function noptimize_login() {
    	if (strpos($_SERVER['REQUEST_URI'],'myspecialloginpage')!==false) {
    		return true;
    	} else {
    		return false;
    	}
    }

    hope this helps,
    frank

Viewing 1 replies (of 1 total)
  • The topic ‘Whitelist the login screen, prevent caching?’ is closed to new replies.