[wp-trac] [WordPress Trac] #14636: Support wildcard expressions in WP_PROXY_BYPASS_HOSTS (and WP_ACCESSIBLE_HOSTS)

WordPress Trac wp-trac at lists.automattic.com
Wed Aug 18 15:48:36 UTC 2010


#14636: Support wildcard expressions in WP_PROXY_BYPASS_HOSTS (and
WP_ACCESSIBLE_HOSTS)
-------------------------+--------------------------------------------------
 Reporter:  sit          |       Owner:                 
     Type:  enhancement  |      Status:  new            
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  HTTP         |     Version:                 
 Severity:  normal       |    Keywords:                 
-------------------------+--------------------------------------------------
 When configuring a proxy inside a firewall, a common configuration is to
 have all external requests go through a proxy and allow internal requests
 to proceed directly.  In such cases, it would be useful to allow wildcard
 expressions to apply to exclusions so that all internal requests could be
 specified simply.  However, today, if I want to send everything but
 *.wordpress.com requests through to a proxy, there is no way to express
 that using WP_PROXY_BYPASS_HOSTS.  Instead, each host needs to be
 explicitly listed, which is not feasible.

 I suppose, ideally, Wordpress would support proxy auto config (.pac files
 http://en.wikipedia.org/wiki/Proxy_auto-config) but just simple wildcard
 support would be a very useful improvement.

 Adding wild-cards could be accomplished by updating the uses of in_array
 in wp-includes/class-http.php (say, in WP_HTTP_Proxy's send_through_proxy
 at line 1634 in trunk today) to use fnmatch (as described here
 http://www.mattgregg.com/php-wildcard-match-in-an-array.html or in some of
 the comments under http://php.net/manual/en/function.in-array.php for
 example). It looks like it should be a pretty straight-forward change.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/14636>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list