Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/wp-includes/class-wp-http.php
Original file line number Diff line number Diff line change
Expand Up @@ -927,6 +927,17 @@ public function block_request( $uri ) {
if ( null === $accessible_hosts ) {
$accessible_hosts = preg_split( '|,\s*|', WP_ACCESSIBLE_HOSTS );

/**
* Filter the list of accessible hosts.
*
* @since 6.9
*
* @param array $wp_accessible_hosts List of accessible hosts.
* @param string $uri The URL being accessed.
* @param array $check The pasesed URL being accessed.
*/
$accessible_hosts = apply_filters( 'wp_http_accessible_hosts', $wp_accessible_hosts, $uri, $check );

if ( str_contains( WP_ACCESSIBLE_HOSTS, '*' ) ) {
$wildcard_regex = array();
foreach ( $accessible_hosts as $host ) {
Expand Down
Loading