diff --git a/apache/files/RedHat/conf.modules.d/remoteip.conf.jinja b/apache/files/RedHat/conf.modules.d/remoteip.conf.jinja new file mode 100644 index 0000000000000000000000000000000000000000..17260b3c26a52d8e228b0f2dd34ea6e6aaa7e3f3 --- /dev/null +++ b/apache/files/RedHat/conf.modules.d/remoteip.conf.jinja @@ -0,0 +1,6 @@ +# managed by saltstack + +RemoteIPHeader {{ salt['pillar.get']('apache:mod_remoteip:RemoteIPHeader', 'X-Forwarded-For') }} +{%- for trusted_proxy in salt['pillar.get']('apache:mod_remoteip:RemoteIPTrustedProxy', []) %} +RemoteIPTrustedProxy {{ trusted_proxy }} +{%- endfor %} diff --git a/apache/mod_remoteip.sls b/apache/mod_remoteip.sls index b2d399d24cd54da4796f45ae2e240b2b3a250222..eaa005798342a753fa9131cc48a188a94b1c01d3 100644 --- a/apache/mod_remoteip.sls +++ b/apache/mod_remoteip.sls @@ -54,7 +54,7 @@ include: file.managed: - template: jinja - source: - - salt://apache/files/{{ salt['grains.get']('os_family') }}/remoteip.conf.jinja + - salt://apache/files/{{ salt['grains.get']('os_family') }}/conf.modules.d/remoteip.conf.jinja - require: - pkg: apache - watch_in: