# activitypub/2.5.0/includes/debug.php

ActivityPub, version 2.5.0. 18 lines.

- Page: https://pluginprobe.com/plugins/activitypub/2.5.0/code/includes/debug.php
- Raw: https://pluginprobe.com/plugins/activitypub/2.5.0/raw/includes/debug.php
- Modified: 2023-09-13T07:14:42+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/activitypub/2.5.0/code/includes/debug.php#L10-L20`.

```php
<?php
namespace Activitypub;

/**
 * Allow localhost URLs if WP_DEBUG is true.
 *
 * @param array  $r   Array of HTTP request args.
 * @param string $url The request URL.
 *
 * @return array Array or string of HTTP request arguments.
 */
function allow_localhost( $r, $url ) {
	$r['reject_unsafe_urls'] = false;

	return $r;
}
add_filter( 'http_request_args', '\Activitypub\allow_localhost', 10, 2 );

```
