Add ability to add trusted hosts
This commit is contained in:
parent
567563c969
commit
ae08938367
|
@ -15,4 +15,9 @@ drupal_settings:
|
|||
database: mydatabase
|
||||
username: user
|
||||
password: secret
|
||||
trusted_hosts: # Optional
|
||||
- '^example\.com$'
|
||||
- '^.+\.example\.com$'
|
||||
- '^example\.org$'
|
||||
- '^.+\.example\.org$'
|
||||
```
|
||||
|
|
|
@ -19,6 +19,14 @@ $databases['{{ key }}']['{{ target }}'] = [
|
|||
$base_url = '{{ item.1.settings.base_url }}';
|
||||
{% endif %}
|
||||
|
||||
{% if item.1.settings.trusted_hosts is defined %}
|
||||
$settings['trusted_host_patterns'] = array(
|
||||
{% for host in item.1.settings.trusted_hosts %}
|
||||
'{{ host }}',
|
||||
{% endfor %}
|
||||
);
|
||||
{% endif %}
|
||||
|
||||
{% if item.1.settings.extra_parameters is defined %}
|
||||
{{ item.1.settings.extra_parameters|indent(0) }}
|
||||
{% endif %}
|
||||
|
|
Reference in a new issue