drupalwxt / helm-drupal

Helm Chart for deploying an enterprise-grade Drupal environment.
https://drupalwxt.github.io/helm-drupal/index.yaml
MIT License
31 stars 23 forks source link

Varnish, $settings['trusted_host_patterns'] and HTTP 400 errors #54

Closed patheard closed 3 years ago

patheard commented 3 years ago

A gotcha I just discovered is that if you're using Varnish and have Drupal trusted_host_patterns set, you'll need to add a host pattern for your Drupal pod.

In our case, the Helm release is called drupal-wxt-dev, so this does the trick:

varnish:
  enabled: true

extraSettings: |-
  $settings['trusted_host_patterns'] = ['^somedomain\.com$', '^drupal-wxt-dev.*$'];

Happy to submit a PR documenting this if you let me know where you'd like it.

sylus commented 3 years ago

Hey yeah we have to do this too :D

I think documenting it in the values.yaml files would be super helpful.

@zachomedia think is best document rather then fix ourselves directly in settings.php file?

patheard commented 3 years ago

Ah, that's not a bad idea to just straight up fix in the settings.php file :)

zachomedia commented 3 years ago

Yeah, that's fair, I think the best right now is to document the requirement.

sylus commented 3 years ago

Thanks a bunch :D merged