comparison modules/apache/templates/mod/remoteip.conf.epp @ 275:d9352a684e62

Mass update of modules to remove deprecation warnings
author IBBoard <dev@ibboard.co.uk>
date Sun, 26 Jan 2020 11:36:07 +0000
parents
children b8d6ada284dd
comparison
equal deleted inserted replaced
274:b2571c28fc27 275:d9352a684e62
1 <%- |
2 String $header,
3 Optional[Array[Variant[Stdlib::Host,Stdlib::IP::Address]]] $internal_proxy = undef,
4 Optional[Stdlib::Absolutepath] $internal_proxy_list = undef,
5 Optional[String] $proxies_header = undef,
6 Boolean $proxy_protocol = undef,
7 Optional[Array[Stdlib::IP::Address]] $proxy_protocol_exceptions = undef,
8 Optional[Array[Stdlib::IP::Address]] $trusted_proxy = undef,
9 Optional[Stdlib::Absolutepath] $trusted_proxy_list = undef,
10 | -%>
11 # Declare the header field which should be parsed for useragent IP addresses
12 RemoteIPHeader <%= $header %>
13
14 <%- if $internal_proxy { -%>
15 # Declare client intranet IP addresses trusted to present
16 # the RemoteIPHeader value
17 <%- [$internal_proxy].flatten.each |$proxy| { -%>
18 RemoteIPInternalProxy <%= $proxy %>
19 <%- } -%>
20 <%- } -%>
21
22 <%- if $internal_proxy_list { -%>
23 RemoteIPInternalProxyList <%= $internal_proxy_list %>
24 <%- } -%>
25
26 <%- if $proxies_header { -%>
27 # Declare the header field which will record all intermediate IP addresses
28 RemoteIPProxiesHeader <%= $proxies_header %>
29 <%- } -%>
30
31 <%- if $proxy_protocol { -%>
32 RemoteIPProxyProtocol On
33 <%- } -%>
34
35 <%- if $proxy_protocol_exceptions { -%>
36 <%- [$proxy_protocol_exceptions].flatten.each |$exception| { -%>
37 RemoteIPProxyProtocolExceptions <%= $exception %>
38 <%- } -%>
39 <%- } -%>
40
41 <%- if $trusted_proxy { -%>
42 # Declare client intranet IP addresses trusted to present
43 # the RemoteIPHeader value
44 <%- [$trusted_proxy].flatten.each |$proxy| { -%>
45 RemoteIPTrustedProxy <%= $proxy %>
46 <%- } -%>
47 <%- } -%>
48
49 <%- if $trusted_proxy_list { -%>
50 RemoteIPTrustedProxyList <%= $trusted_proxy_list %>
51 <%- } -%>