Skip to content

Commit

Permalink
DQA-9566: DRUPAL_REVERSE_PROXY not properly set (#781)
Browse files Browse the repository at this point in the history
  • Loading branch information
joaocsilva authored Jun 12, 2024
1 parent 28414a2 commit 2af200b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/TaskRunner/Commands/DrupalCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -620,8 +620,8 @@ protected function getToolkitSettingsBlock()
\$settings['file_temp_path'] = getenv('DRUPAL_FILE_TEMP_PATH') !== FALSE ? getenv('DRUPAL_FILE_TEMP_PATH') : '/tmp';
// Reverse proxy.
if (intval(getenv('DRUPAL_REVERSE_PROXY_ENABLE')) === 1) {
\$settings['reverse_proxy'] = (bool) getenv('DRUPAL_REVERSE_PROXY_ENABLE');
if (filter_var(getenv('DRUPAL_REVERSE_PROXY_ENABLE'), FILTER_VALIDATE_BOOLEAN)) {
\$settings['reverse_proxy'] = getenv('DRUPAL_REVERSE_PROXY_ENABLE');
\$settings['reverse_proxy_addresses'] = explode(',', getenv('DRUPAL_REVERSE_PROXY_ADDRESSES'));
}
Expand Down
12 changes: 6 additions & 6 deletions tests/fixtures/commands/drupal-settings-setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
$settings['file_temp_path'] = getenv('DRUPAL_FILE_TEMP_PATH') !== FALSE ? getenv('DRUPAL_FILE_TEMP_PATH') : '/tmp';
// Reverse proxy.
if (intval(getenv('DRUPAL_REVERSE_PROXY_ENABLE')) === 1) {
$settings['reverse_proxy'] = (bool) getenv('DRUPAL_REVERSE_PROXY_ENABLE');
if (filter_var(getenv('DRUPAL_REVERSE_PROXY_ENABLE'), FILTER_VALIDATE_BOOLEAN)) {
$settings['reverse_proxy'] = getenv('DRUPAL_REVERSE_PROXY_ENABLE');
$settings['reverse_proxy_addresses'] = explode(',', getenv('DRUPAL_REVERSE_PROXY_ADDRESSES'));
}
Expand Down Expand Up @@ -103,8 +103,8 @@
$settings['file_temp_path'] = getenv('DRUPAL_FILE_TEMP_PATH') !== FALSE ? getenv('DRUPAL_FILE_TEMP_PATH') : '/tmp';
// Reverse proxy.
if (intval(getenv('DRUPAL_REVERSE_PROXY_ENABLE')) === 1) {
$settings['reverse_proxy'] = (bool) getenv('DRUPAL_REVERSE_PROXY_ENABLE');
if (filter_var(getenv('DRUPAL_REVERSE_PROXY_ENABLE'), FILTER_VALIDATE_BOOLEAN)) {
$settings['reverse_proxy'] = getenv('DRUPAL_REVERSE_PROXY_ENABLE');
$settings['reverse_proxy_addresses'] = explode(',', getenv('DRUPAL_REVERSE_PROXY_ADDRESSES'));
}
Expand Down Expand Up @@ -167,8 +167,8 @@
$settings['file_temp_path'] = getenv('DRUPAL_FILE_TEMP_PATH') !== FALSE ? getenv('DRUPAL_FILE_TEMP_PATH') : '/tmp';
// Reverse proxy.
if (intval(getenv('DRUPAL_REVERSE_PROXY_ENABLE')) === 1) {
$settings['reverse_proxy'] = (bool) getenv('DRUPAL_REVERSE_PROXY_ENABLE');
if (filter_var(getenv('DRUPAL_REVERSE_PROXY_ENABLE'), FILTER_VALIDATE_BOOLEAN)) {
$settings['reverse_proxy'] = getenv('DRUPAL_REVERSE_PROXY_ENABLE');
$settings['reverse_proxy_addresses'] = explode(',', getenv('DRUPAL_REVERSE_PROXY_ADDRESSES'));
}
Expand Down

0 comments on commit 2af200b

Please sign in to comment.