drupal-for-kubernetes icon indicating copy to clipboard operation
drupal-for-kubernetes copied to clipboard

Configure trusted host settings in Docker container environment

Open geerlingguy opened this issue 5 years ago • 2 comments

From the Status report page (https://www.pidramble.com/admin/reports/status):

Not enabled The trusted_host_patterns setting is not configured in settings.php. This can lead to security vulnerabilities. It is highly recommended that you configure this. See Protecting against HTTP HOST Header attacks for more information.

I should add a setting for www.pidramble.com in production, or localhost locally.

geerlingguy avatar Jun 03 '20 23:06 geerlingguy

Trying to figure this out myself. Tried passing it as a "command:" in docker-compose.yml, but due to the square brackets contained in the code, docker-compose did not like it. It will not allow [] to be passed as a string. Need to try adding it as a .txt file and cat the file to settings.php.

dcwestra avatar May 08 '23 18:05 dcwestra

Nevermind. The instructions are in the drupal docs. Justus tested and it works.

https://www.drupal.org/docs/getting-started/installing-drupal/trusted-host-settings#s-advanced-instructions

dcwestra avatar May 09 '23 10:05 dcwestra