wphooks.info - block_local_requests

block_local_requests

(trunk - 5.0-alpha-42177)

The hook occurs in the following file:

wp-includes/class-http.php:
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
		// Don't block requests back to ourselves by default.
		if ( 'localhost' == $check['host'] || ( isset( $home['host'] ) && $home['host'] == $check['host'] ) ) {
			/**
			 * Filters whether to block local requests through the proxy.
			 *
			 * @since 2.8.0
			 *
			 * @param bool $block Whether to block local requests through proxy.
			 *                    Default false.
			 */
			return apply_filters( 'block_local_requests', false );
		}

		if ( !defined('WP_ACCESSIBLE_HOSTS') )
			return true;

		static $accessible_hosts = null;
		static $wildcard_regex = array();
		if ( null === $accessible_hosts ) {
			$accessible_hosts = preg_split('|,\s*|', WP_ACCESSIBLE_HOSTS);