Skip to content

Commit

Permalink
Merge pull request #1935 from aukesj/master
Browse files Browse the repository at this point in the history
(MODULES-9668 ) Please make ProxyRequests setting in vhost.pp configurable
  • Loading branch information
Erick Banks authored Aug 20, 2019
2 parents f0dac30 + cd38f18 commit 401a037
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -808,6 +808,7 @@ This release features many improvements and bugfixes, including several new defi
- passenger_ruby
- passenger_start_timeout
- proxy_preserve_host
- proxy_requests
- redirectmatch_dest
- ssl_crl_check
- wsgi_chunked_request
Expand Down
1 change: 1 addition & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,7 @@ This release features many improvements and bugfixes, including several new defi
- passenger_ruby
- passenger_start_timeout
- proxy_preserve_host
- proxy_requests
- redirectmatch_dest
- ssl_crl_check
- wsgi_chunked_request
Expand Down
12 changes: 11 additions & 1 deletion REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4657,7 +4657,7 @@ The following parameters are available in the `apache::mod::proxy` class.

##### `proxy_requests`

Data type: `Any`
Data type: `Boolean`

Enables forward (standard) proxy requests.

Expand Down Expand Up @@ -7369,6 +7369,16 @@ X-Forwarded-Host and X-Forwarded-Server) get sent to the backend server.

Default value: `undef`

##### `proxy_requests`

Data type: `Boolean`

Sets the [ProxyRequests Directive](https://httpd.apache.org/docs/current/mod/mod_proxy.html#proxyrequests).
This prarmeter allows or prevents Apache httpd from functioning as a forward proxy server.
(Setting ProxyRequests to Off does not disable use of the ProxyPass directive.)

Default value: `false`

##### `proxy_error_override`

Data type: `Any`
Expand Down
1 change: 1 addition & 0 deletions manifests/vhost.pp
Original file line number Diff line number Diff line change
Expand Up @@ -1705,6 +1705,7 @@
$proxy_dest_reverse_match = undef,
$proxy_pass = undef,
$proxy_pass_match = undef,
Boolean $proxy_requests = false,
$suphp_addhandler = $::apache::params::suphp_addhandler,
Enum['on', 'off'] $suphp_engine = $::apache::params::suphp_engine,
$suphp_configpath = $::apache::params::suphp_configpath,
Expand Down
1 change: 1 addition & 0 deletions spec/defines/vhost_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@
'setenv' => ['proxy-nokeepalive 1', 'force-proxy-request-1.0 1'],
},
],
'proxy_requests' => false,
'suphp_addhandler' => 'foo',
'suphp_engine' => 'on',
'suphp_configpath' => '/var/www/html',
Expand Down
4 changes: 4 additions & 0 deletions templates/vhost/_proxy.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
<% if @proxy_dest or @proxy_pass or @proxy_pass_match or @proxy_dest_match -%>

## Proxy rules
<% if @proxy_requests -%>
ProxyRequests On
<% else -%>
ProxyRequests Off
<%- end -%>
<%- end -%>
<% if @proxy_preserve_host -%>
ProxyPreserveHost On
<% else -%>
Expand Down

0 comments on commit 401a037

Please sign in to comment.