-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplify data types and array handling #2457
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
<%- | | ||
String $header, | ||
Optional[Array[Variant[Stdlib::Host,Stdlib::IP::Address]]] $internal_proxy = undef, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is the template used anywhere where the Variant type is used as well? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good point. https://github.com/puppetlabs/puppetlabs-apache/blob/main/manifests/mod/remoteip.pp should also be simplified. |
||
Optional[Array[Stdlib::Host]] $internal_proxy = undef, | ||
Optional[Stdlib::Absolutepath] $internal_proxy_list = undef, | ||
Optional[String] $proxies_header = undef, | ||
Boolean $proxy_protocol = undef, | ||
Optional[Array[Variant[Stdlib::Host,Stdlib::IP::Address]]] $proxy_protocol_exceptions = undef, | ||
Optional[Array[Stdlib::Host]] $proxy_protocol_exceptions = undef, | ||
Optional[Array[Stdlib::IP::Address]] $trusted_proxy = undef, | ||
Optional[Stdlib::Absolutepath] $trusted_proxy_list = undef, | ||
| -%> | ||
|
@@ -14,7 +14,7 @@ RemoteIPHeader <%= $header %> | |
<%- if $internal_proxy { -%> | ||
# Declare client intranet IP addresses trusted to present | ||
# the RemoteIPHeader value | ||
<%- [$internal_proxy].flatten.each |$proxy| { -%> | ||
<%- $internal_proxy.each |$proxy| { -%> | ||
RemoteIPInternalProxy <%= $proxy %> | ||
<%- } -%> | ||
<%- } -%> | ||
|
@@ -33,15 +33,15 @@ RemoteIPProxyProtocol On | |
<%- } -%> | ||
|
||
<%- if $proxy_protocol_exceptions { -%> | ||
<%- [$proxy_protocol_exceptions].flatten.each |$exception| { -%> | ||
<%- $proxy_protocol_exceptions.each |$exception| { -%> | ||
RemoteIPProxyProtocolExceptions <%= $exception %> | ||
<%- } -%> | ||
<%- } -%> | ||
|
||
<%- if $trusted_proxy { -%> | ||
# Declare client intranet IP addresses trusted to present | ||
# the RemoteIPHeader value | ||
<%- [$trusted_proxy].flatten.each |$proxy| { -%> | ||
<%- $trusted_proxy.each |$proxy| { -%> | ||
RemoteIPTrustedProxy <%= $proxy %> | ||
<%- } -%> | ||
<%- } -%> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait, "The type Stdlib::Host includes Stdlib::IP::Address", was it not supposed to be the other way around?
🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bleh, that's what you get for quickly doing the work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#2458