Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DQA-9566: DRUPAL_REVERSE_PROXY not properly set #781

Merged
merged 3 commits into from
Jun 12, 2024

Conversation

joaocsilva
Copy link
Contributor

No description provided.

@joaocsilva joaocsilva merged commit 2af200b into release/10.x Jun 12, 2024
2 checks passed
@joaocsilva joaocsilva deleted the feature/DQA-9566 branch June 12, 2024 09:54
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');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it be like this: $settings['reverse_proxy'] = true; ? Usage of FILTER_VALIDATE_BOOLEAN can handle multiple truthy values like "1", "true", "on" and "yes" and assigns the raw value of getenv('DRUPAL_REVERSE_PROXY_ENABLE') to $settings['reverse_proxy'], which could be a string ("true", "1", etc.).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Ozyrys ,
The problem is the different infrastructures, in one side it should be True and another should be 1.
To make this more flexible, I decided to let it just receive the value defined by each project, but using the filter_var() just to ensure that is set and is any kind of positive.
Let me know if it make sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants