• Resolved lucabarelli

    (@lucabarelli)


    Hi nintechnet,
    I’m writing this just to inform other users that if they plan to block all access to the REST API (like I did), might experience some drawbacks on search engines listing.

    Btw since you’ve listed my previous thread in your help section, I’d like to add something more about CIDR handling in .htninja file.
    It is possible to use the same CIDR function for both allowed and blocked blocks. Just one has to make sure to use another name for the function, like this:

    foreach ( $cidr_array_no as $cidr ) {
       // Check IP vs CIDR:
       if ( ipCIDRCheck( $_SERVER['REMOTE_ADDR'], $cidr ) ) {
          // IP matches, block it:
          return 'BLOCK';
       }
    }
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author nintechnet

    (@nintechnet)

    Hi,

    I added a warning beside the block REST API policy in NinjaFirewall v3.5.1 which should be released next week. Many plugins, themes but also WordPress too are now using it, and blocking all accesses to the API is likely going to break some functionality on most blogs.

    Thread Starter lucabarelli

    (@lucabarelli)

    Hi nintechnet,
    ok I get it. Am going to open another thread about the CIDR notation since it’s not working

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[warning] Search engines might be blocked if WP REST API is restricted’ is closed to new replies.