# activitypub/0.14.3/includes/debug.php

ActivityPub, version 0.14.3. 17 lines.

- Page: https://pluginprobe.com/plugins/activitypub/0.14.3/code/includes/debug.php
- Raw: https://pluginprobe.com/plugins/activitypub/0.14.3/raw/includes/debug.php
- Modified: 2021-07-23T13:52:40+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/0.14.3/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 $args 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 );

```
