From 7fe4f3ad7905f2230ce5b17bfebe00021c87fa73 Mon Sep 17 00:00:00 2001
From: jurgenhaas <juergen@paragon-es.de>
Date: Wed, 11 May 2016 11:25:29 +0200
Subject: [PATCH] ansible-inventories/arocom#116 Support Drupal aliases without
 redirect

---
 templates/haproxy_cfg | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/templates/haproxy_cfg b/templates/haproxy_cfg
index 9d3f468..9490775 100644
--- a/templates/haproxy_cfg
+++ b/templates/haproxy_cfg
@@ -67,7 +67,9 @@ frontend http_in
 {% for domain in drupal.domains|default([]) %}
 {% if not domain.multidomain|default(false) %}
 {% for alias in domain.aliases|default([]) %}
+{% if domain.aliases_without_redirect is not defined or alias not in domain.aliases_without_redirect %}
   redirect prefix {{ domain.protocol|default('https') }}://{{domain.domain}} code 301 if { hdr(host) -i -n {{alias}} }
+{% endif %}
 {% endfor %}
 {% endif %}
 {% endfor %}
@@ -111,7 +113,9 @@ frontend https_in_{{ cert.ip }}
 {% for domain in drupal.domains|default([]) %}
 {% if not domain.multidomain|default(false) %}
 {% for alias in domain.aliases|default([]) %}
+{% if domain.aliases_without_redirect is not defined or alias not in domain.aliases_without_redirect %}
   redirect prefix {{ domain.protocol|default('https') }}://{{domain.domain}} code 301 if { hdr(host) -i -n {{alias}} }
+{% endif %}
 {% endfor %}
 {% endif %}
 {% endfor %}
-- 
GitLab