comprosulting

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • in reply to: Request to Disable External HTTP API Calls in Aiomatic Plugin Dashboard #11828


    comprosulting
    Participant
    Post count: 1

    I blocked it by:

    function disable_aiomatic_external_requests( $pre, $args, $url ) {
    if (
    strpos( $url, ‘wpinitiate.com/custom-feeds/items.xml’ ) !== false ||
    strpos( $url, ‘coderevolution.ro/feed/’ ) !== false
    ) {
    return new WP_Error( ‘blocked’, ‘External request blocked for performance reasons’ );
    }
    return $pre;
    }
    add_filter( ‘pre_http_request’, ‘disable_aiomatic_external_requests’, 10, 3 );

Viewing 1 post (of 1 total)