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

Update or remove trusted_host_patterns settings in settingsacquia-custom.php #143

Open
byrond opened this issue Feb 8, 2023 · 0 comments

Comments

@byrond
Copy link
Contributor

byrond commented Feb 8, 2023

Do these lines do anything?

$settings['trusted_host_patterns'][] = "^{$_ENV['AH_SITE_ENVIRONMENT']}dev.prod.acquia-sites.com";
$settings['trusted_host_patterns'][] = "^{$_ENV['AH_SITE_ENVIRONMENT']}stg.prod.acquia-sites.com";

Because they reference the AH_SITE_ENVIRONMENT environment variable, they result in values like:

  • devdev.prod.acquia-sites.com and devstg.prod.acquia-sites.com
  • proddev.prod.acquia-sites.com and prodstgprod.acquia-sites.com

The trusted host patterns for each environment are set in the /var/www/site-php... includes:
https://support-acquia.force.com/s/article/360037529873-How-is-the-trusted-host-patterns-configuration-set-on-Acquia-Cloud

I believe the default settings account for additional domain names on environments.

Should we just remove these lines or just comment them out and maybe update them to something like:
// $settings['trusted_host_patterns'][] = "^example.com";

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

No branches or pull requests

1 participant