The trusted host patterns (
$settings['trusted_host_patterns']) is loaded within the Acquia database require, which loads a series of settings for Acquia Cloud.
By default, the trusted host pattern is populated with your existing domains registered in the Domains tab in the Acquia Cloud UI, relative to the environment you are looking at.
You can set trusted host patterns by yourself manually, but you will need to do that after the Acquia require statement in your
settings.php, so it will override Acquia default settings.