Skip to content
Snippets Groups Projects
Commit 959b20da authored by Balu Ertl's avatar Balu Ertl Committed by Jakob P
Browse files

Issue #3404644: Read from reverse_proxy_addresses not reverse_proxies

parent ac0d3cbe
Branches 2497145-front-page
No related tags found
1 merge request!7Issue #3404644: Read from reverse_proxy_addresses not reverse_proxies
......@@ -98,11 +98,16 @@ class PlatformInfo implements PlatformInfoInterface {
*/
public function __construct(string $site_path, Settings $settings, StateInterface $state) {
// Generate the Drupal sitepath from service.
// Generate the Drupal site path from service.
$this->sitePath = $site_path;
// Take the IP addresses from the 'reverse_proxies' setting.
if (is_array($reverse_proxies = $settings->get('reverse_proxies'))) {
// Take the IP addresses from the 'reverse_proxy_addresses' setting.
$reverse_proxies = $settings->get('reverse_proxy_addresses');
if ($reverse_proxies === NULL) {
// Fallback to legacy setting.
$reverse_proxies = $settings->get('reverse_proxies');
}
if (is_array($reverse_proxies)) {
foreach ($reverse_proxies as $reverse_proxy) {
if ($reverse_proxy && strpos($reverse_proxy, '.')) {
$this->balancerAddresses[] = $reverse_proxy;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment