瀏覽代碼

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

* feat(trusted_proxy): Add support for RemoteIPInternalProxy

* fix(syntax): add semicolon
tags/v1.1.2
Marius van Witzenburg 4 年之前
父節點
當前提交
22c647eb5c
No account linked to committer's email address
共有 4 個文件被更改,包括 12 次插入0 次删除
  1. +3
    -0
      apache/files/Debian/conf-available/remoteip.conf.jinja
  2. +3
    -0
      apache/files/RedHat/conf.modules.d/remoteip.conf.jinja
  3. +3
    -0
      pillar.example
  4. +3
    -0
      test/salt/pillar/modules.sls

+ 3
- 0
apache/files/Debian/conf-available/remoteip.conf.jinja 查看文件

@@ -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', []) %}
RemoteIPTrustedProxy {{ trusted_proxy }}
{%- endfor %}
{%- for trusted_proxy in salt['pillar.get']('apache:mod_remoteip:RemoteIPInternalProxy', []) %}
RemoteIPInternalProxy {{ trusted_proxy }}
{%- endfor %}

+ 3
- 0
apache/files/RedHat/conf.modules.d/remoteip.conf.jinja 查看文件

@@ -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', []) %}
RemoteIPTrustedProxy {{ trusted_proxy }}
{%- endfor %}
{%- for trusted_proxy in salt['pillar.get']('apache:mod_remoteip:RemoteIPInternalProxy', []) %}
RemoteIPInternalProxy {{ trusted_proxy }}
{%- endfor %}

+ 3
- 0
pillar.example 查看文件

@@ -444,6 +444,9 @@ apache:
RemoteIPTrustedProxy:
- 10.0.8.0/24
- 127.0.0.1
RemoteIPInternalProxy:
- 10.10.8.0/24
- 127.0.0.1

# ``apache.mod_security`` formula additional configuration:
mod_security:

+ 3
- 0
test/salt/pillar/modules.sls 查看文件

@@ -427,6 +427,9 @@ apache:
RemoteIPTrustedProxy:
- 10.0.8.0/24
- 127.0.0.1
RemoteIPInternalProxy:
- 10.10.8.0/24
- 127.0.0.1

# ``apache.mod_security`` formula additional configuration:
mod_security:

Loading…
取消
儲存