diff --git a/templates/mod/remoteip.conf.epp b/templates/mod/remoteip.conf.epp index 439de12f68..6f2e67d0cc 100644 --- a/templates/mod/remoteip.conf.epp +++ b/templates/mod/remoteip.conf.epp @@ -1,17 +1,17 @@ <%- | String $header, - Optional[Array[Stdlib::Host]] $internal_proxy = undef, + Array[Stdlib::Host] $internal_proxy = [], Optional[Stdlib::Absolutepath] $internal_proxy_list = undef, Optional[String] $proxies_header = undef, Boolean $proxy_protocol = undef, - Optional[Array[Stdlib::Host]] $proxy_protocol_exceptions = undef, - Optional[Array[Stdlib::IP::Address]] $trusted_proxy = undef, + Array[Stdlib::Host] $proxy_protocol_exceptions = [], + Array[Stdlib::IP::Address] $trusted_proxy = [], Optional[Stdlib::Absolutepath] $trusted_proxy_list = undef, | -%> # Declare the header field which should be parsed for useragent IP addresses RemoteIPHeader <%= $header %> -<%- if $internal_proxy { -%> +<%- unless $internal_proxy.empty { -%> # Declare client intranet IP addresses trusted to present # the RemoteIPHeader value <%- $internal_proxy.each |$proxy| { -%> @@ -32,13 +32,11 @@ RemoteIPProxiesHeader <%= $proxies_header %> RemoteIPProxyProtocol On <%- } -%> -<%- if $proxy_protocol_exceptions { -%> -<%- $proxy_protocol_exceptions.each |$exception| { -%> +<%- $proxy_protocol_exceptions.each |$exception| { -%> RemoteIPProxyProtocolExceptions <%= $exception %> -<%- } -%> <%- } -%> -<%- if $trusted_proxy { -%> +<%- unless $trusted_proxy.empty { -%> # Declare client intranet IP addresses trusted to present # the RemoteIPHeader value <%- $trusted_proxy.each |$proxy| { -%>