Problem/Motivation
Struggling to get PHP working in a network that is accessing the Internet through a proxy, I found this piece of code with optional settings in sites/default/default.settings.php
:
/**
* External access proxy settings:
*
* If your site must access the Internet via a web proxy then you can enter
* the proxy settings here. Currently only basic authentication is supported
* by using the username and password variables. The proxy_user_agent variable
* can be set to NULL for proxies that require no User-Agent header or to a
* non-empty string for proxies that limit requests to a specific agent. The
* proxy_exceptions variable is an array of host names to be accessed directly,
* not via proxy.
*/
# $settings['proxy_server'] = '';
# $settings['proxy_port'] = 8080;
# $settings['proxy_username'] = '';
# $settings['proxy_password'] = '';
# $settings['proxy_user_agent'] = '';
# $settings['proxy_exceptions'] = array('127.0.0.1', 'localhost');
The above settings are never used by core. They are relics from Drupal <=7, used by loved and hated drupal_http_request(). This might confuse some site builders because they might think that filling those settings they will benefit somehow.
The Drupal 8 Guzzle implementation is using now other settings, that are array-namespaced under $settings['http_client_config']['proxy']
.
Proposed resolution
Change the documentation to instruct the site builder/admin to use the $settings['http_client_config']['proxy']
variables.
Remaining tasks
None.
User interface changes
None.
API changes
None.
Data model changes
None.