From 198c914041f6a28fbaa16107c5648914beecfda1 Mon Sep 17 00:00:00 2001
From: jurgenhaas <juergen@paragon-es.de>
Date: Thu, 2 Mar 2017 11:18:01 +0100
Subject: [PATCH] Implement support for trusted domains in Drupal, that won't
 get redirected like the aliases

---
 templates/host_list     | 5 ++++-
 templates/host_ssl_list | 5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/templates/host_list b/templates/host_list
index 8eeb596..804d0cf 100644
--- a/templates/host_list
+++ b/templates/host_list
@@ -3,13 +3,16 @@
 {% endfor %}
 {% for drupal in hostvars[item].drupal_settings|default([]) %}
 {% for domain in drupal.domains|default([]) %}
-{% if domain.route_by_domain|default(true) %}
 {% if domain.protocol|default('https') == 'http' %}
+{% if domain.route_by_domain|default(true) %}
 {{domain.domain}}
 {% for alias in domain.aliases|default([]) %}
 {{alias}}
 {% endfor %}
 {% endif %}
+{% for trusted_domain in domain.trusted_domains|default([]) %}
+{{trusted_domain}}
+{% endfor %}
 {% endif %}
 {% endfor %}
 {% endfor %}
diff --git a/templates/host_ssl_list b/templates/host_ssl_list
index 3c4326a..02f2ddb 100644
--- a/templates/host_ssl_list
+++ b/templates/host_ssl_list
@@ -3,13 +3,16 @@
 {% endfor %}
 {% for drupal in hostvars[item].drupal_settings|default([]) %}
 {% for domain in drupal.domains|default([]) %}
-{% if domain.route_by_domain|default(true) %}
 {% if domain.protocol|default('https') == 'https' %}
+{% if domain.route_by_domain|default(true) %}
 {{domain.domain}}
 {% for alias in domain.aliases|default([]) %}
 {{alias}}
 {% endfor %}
 {% endif %}
+{% for trusted_domain in domain.trusted_domains|default([]) %}
+{{trusted_domain}}
+{% endfor %}
 {% endif %}
 {% endfor %}
 {% endfor %}
-- 
GitLab