Skip to content
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

Fixes mod::proxy allow_from parameter inconsistency #2352 #2385

Merged
merged 1 commit into from
Feb 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5611,9 +5611,9 @@ Default value: `'Off'`

##### <a name="-apache--mod--proxy--allow_from"></a>`allow_from`

Data type: `Optional[Stdlib::IP::Address]`
Data type: `Optional[Variant[Stdlib::IP::Address, Array[Stdlib::IP::Address]]]`

List of IPs allowed to access proxy.
IP address or list of IPs allowed to access proxy.

Default value: `undef`

Expand Down
4 changes: 2 additions & 2 deletions manifests/mod/proxy.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Enables forward (standard) proxy requests.
#
# @param allow_from
# List of IPs allowed to access proxy.
# IP address or list of IPs allowed to access proxy.
#
# @param package_name
# Name of the proxy package to install.
Expand All @@ -23,7 +23,7 @@
#
class apache::mod::proxy (
String $proxy_requests = 'Off',
Optional[Stdlib::IP::Address] $allow_from = undef,
Optional[Variant[Stdlib::IP::Address, Array[Stdlib::IP::Address]]] $allow_from = undef,
Optional[String] $package_name = undef,
String $proxy_via = 'On',
Optional[Integer[0]] $proxy_timeout = undef,
Expand Down
4 changes: 4 additions & 0 deletions templates/mod/proxy.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@

<% if @proxy_requests != 'Off' or ( @allow_from and ! @allow_from.empty? ) -%>
<Proxy *>
<%- if @allow_from.is_a? Array -%>
Require ip <%= @allow_from.join(" ") %>
<%- else -%>
Require ip <%= @allow_from %>
<%- end -%>
</Proxy>
<% end -%>

Expand Down