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 0000000..17260b3 --- /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 b2d399d..eaa0057 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: