drupalwxt/helm-drupal

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

patheard opened this issue · 4 comments

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

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?

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

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

sylus commented

Thanks a bunch :D merged