feature(trust): improved remote ip internal proxy support (#300)

* feat(trusted_proxy): Add support for RemoteIPInternalProxy

* fix(syntax): add semicolon
This commit is contained in:
Marius van Witzenburg 2021-01-08 12:33:46 +01:00 committed by GitHub
parent 6c529330e6
commit 22c647eb5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 0 deletions

View File

@ -2,3 +2,6 @@ RemoteIPHeader {{ salt['pillar.get']('apache:mod_remoteip:RemoteIPHeader', 'X-Fo
{%- for trusted_proxy in salt['pillar.get']('apache:mod_remoteip:RemoteIPTrustedProxy', []) %} {%- for trusted_proxy in salt['pillar.get']('apache:mod_remoteip:RemoteIPTrustedProxy', []) %}
RemoteIPTrustedProxy {{ trusted_proxy }} RemoteIPTrustedProxy {{ trusted_proxy }}
{%- endfor %} {%- endfor %}
{%- for trusted_proxy in salt['pillar.get']('apache:mod_remoteip:RemoteIPInternalProxy', []) %}
RemoteIPInternalProxy {{ trusted_proxy }}
{%- endfor %}

View File

@ -6,3 +6,6 @@ RemoteIPHeader {{ salt['pillar.get']('apache:mod_remoteip:RemoteIPHeader', 'X-Fo
{%- for trusted_proxy in salt['pillar.get']('apache:mod_remoteip:RemoteIPTrustedProxy', []) %} {%- for trusted_proxy in salt['pillar.get']('apache:mod_remoteip:RemoteIPTrustedProxy', []) %}
RemoteIPTrustedProxy {{ trusted_proxy }} RemoteIPTrustedProxy {{ trusted_proxy }}
{%- endfor %} {%- endfor %}
{%- for trusted_proxy in salt['pillar.get']('apache:mod_remoteip:RemoteIPInternalProxy', []) %}
RemoteIPInternalProxy {{ trusted_proxy }}
{%- endfor %}

View File

@ -444,6 +444,9 @@ apache:
RemoteIPTrustedProxy: RemoteIPTrustedProxy:
- 10.0.8.0/24 - 10.0.8.0/24
- 127.0.0.1 - 127.0.0.1
RemoteIPInternalProxy:
- 10.10.8.0/24
- 127.0.0.1
# ``apache.mod_security`` formula additional configuration: # ``apache.mod_security`` formula additional configuration:
mod_security: mod_security:

View File

@ -427,6 +427,9 @@ apache:
RemoteIPTrustedProxy: RemoteIPTrustedProxy:
- 10.0.8.0/24 - 10.0.8.0/24
- 127.0.0.1 - 127.0.0.1
RemoteIPInternalProxy:
- 10.10.8.0/24
- 127.0.0.1
# ``apache.mod_security`` formula additional configuration: # ``apache.mod_security`` formula additional configuration:
mod_security: mod_security: