Ability to configure oslo_middleware/enable_proxy_headers_parsing
PROD-29854
Change-Id: I6245c90af528ec8a33db003f03a46aa989250062
diff --git a/ironic/files/pike/ironic.conf b/ironic/files/pike/ironic.conf
index f8dc1eb..3bee2e3 100644
--- a/ironic/files/pike/ironic.conf
+++ b/ironic/files/pike/ironic.conf
@@ -3818,6 +3818,19 @@
# taken from the matchmaker. (list value)
#subscribe_on =
+[oslo_middleware]
+
+#
+# From oslo.middleware.http_proxy_to_wsgi
+#
+
+# Whether the application is behind a proxy or not. This
+# determines if the middleware should parse the headers or
+# not. (boolean value)
+#enable_proxy_headers_parsing = false
+{%- if ironic.get('middleware', {}).enable_proxy_headers_parsing is defined %}
+enable_proxy_headers_parsing = {{ ironic.middleware.enable_proxy_headers_parsing }}
+{%- endif %}
[oslo_policy]
diff --git a/ironic/files/queens/ironic.conf b/ironic/files/queens/ironic.conf
index ad4df03..cd0f1b6 100644
--- a/ironic/files/queens/ironic.conf
+++ b/ironic/files/queens/ironic.conf
@@ -2383,6 +2383,12 @@
{%- include "oslo_templates/files/queens/oslo/messaging/_" + messaging_engine + ".conf" %}
{%- endif %}
+[oslo_middleware]
+{%- if ironic.middleware is defined %}
+{%- set _data = ironic.middleware %}
+{%- include "oslo_templates/files/queens/oslo/_middleware.conf" %}
+{%- endif %}
+
[oslo_policy]
{%- if ironic.policy is defined %}
{%- set _data = ironic.policy %}
diff --git a/ironic/files/rocky/ironic.conf b/ironic/files/rocky/ironic.conf
index 4be00e2..896261b 100644
--- a/ironic/files/rocky/ironic.conf
+++ b/ironic/files/rocky/ironic.conf
@@ -2773,6 +2773,12 @@
{%- include "oslo_templates/files/rocky/oslo/messaging/_" + messaging_engine + ".conf" %}
{%- endif %}
+[oslo_middleware]
+{%- if ironic.middleware is defined %}
+{%- set _data = ironic.middleware %}
+{%- include "oslo_templates/files/queens/oslo/_middleware.conf" %}
+{%- endif %}
+
[oslo_policy]
{%- if ironic.policy is defined %}
{%- set _data = ironic.policy %}