[wp-trac] [WordPress Trac] #20222: No way to force local HTTP requests through proxy
WordPress Trac
wp-trac at lists.automattic.com
Thu Apr 5 23:13:22 UTC 2012
#20222: No way to force local HTTP requests through proxy
--------------------------+------------------------------
Reporter: johnbillion | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: HTTP | Version:
Severity: normal | Resolution:
Keywords: has-patch |
--------------------------+------------------------------
Changes (by kurtpayne):
* cc: kpayne@… (added)
Comment:
[[attachment:20222-2.patch]] uses a callback.
You can determine per URL like so:
{{{
add_filter( 'proxy_local_urls_callback', function() {
return 'check_url';
});
function check_url( $url ) {
return true; // your logic here
}
}}}
Or you can enable all proxying for all local URLs
{{{
add_filter( 'proxy_local_urls_callback', '__return_true' );
}}}
Default behavior is backwards compatible.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20222#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list