Comments 5
У меня возникла штатная ситуация, я посмотрел в документации как её решить и сейчас напишу об этом пост на Хабре. Яху!
Ок, не в документации. Ввел в гугле «wordpress proxy» и кликнул по первой ссылке.
Зачем гуглить? В WP достаточно хорошо организованы исходники.
Открываем class-http.php и видим что фича с версии 2.8:
Открываем class-http.php и видим что фича с версии 2.8:
/** * Adds Proxy support to the WordPress HTTP API. * * There are caveats to proxy support. It requires that defines be made in the wp-config.php file to * enable proxy support. There are also a few filters that plugins can hook into for some of the * constants. * * Please note that only BASIC authentication is supported by most transports. * cURL MAY support more methods (such as NTLM authentication) depending on your environment. * * The constants are as follows: * <ol> * <li>WP_PROXY_HOST - Enable proxy support and host for connecting.</li> * <li>WP_PROXY_PORT - Proxy port for connection. No default, must be defined.</li> * <li>WP_PROXY_USERNAME - Proxy username, if it requires authentication.</li> * <li>WP_PROXY_PASSWORD - Proxy password, if it requires authentication.</li> * <li>WP_PROXY_BYPASS_HOSTS - Will prevent the hosts in this list from going through the proxy. * You do not need to have localhost and the blog host in this list, because they will not be passed * through the proxy. The list should be presented in a comma separated list, wildcards using * are supported, eg. *.wordpress.org</li> * </ol> * * An example can be as seen below. * <code> * define('WP_PROXY_HOST', '192.168.84.101'); * define('WP_PROXY_PORT', '8080'); * define('WP_PROXY_BYPASS_HOSTS', 'localhost, www.example.com, *.wordpress.org'); * </code> * * @link http://core.trac.wordpress.org/ticket/4011 Proxy support ticket in WordPress. * @link http://core.trac.wordpress.org/ticket/14636 Allow wildcard domains in WP_PROXY_BYPASS_HOSTS * @since 2.8 */ class WP_HTTP_Proxy {
Троллинг цветет и пахнет?
Как научить Chrome дружить с Proxy? Легко!
Sign up to leave a comment.
Как научить Wordpress движок дружить с Proxy? Легко!