Browse Source

new: [apache] added ``apache-proxy-path-options`` to allow adding custom options to ``ProxyPass`` line.

framadate
Valentin Lab 6 years ago
parent
commit
f5251cef62
  1. 8
      apache/lib/common
  2. 10
      apache/test/vhost

8
apache/lib/common

@ -678,9 +678,13 @@ target-get() {
}
__vhost_proxy_statement() {
local protocol="$1" cfg="$2" dest="$3"
local protocol="$1" cfg="$2" dest="$3" proxy_pass_options target
target=$(target-get "$cfg") || return 1
proxy_pass_options=($(e "$cfg" | shyaml -y -q get-value apache-proxy-pass-options | yaml_get_values))
if [ "${#proxy_pass_options[@]}" == 0 ]; then
proxy_pass_options=(${proxy_pass_options:-"retry=0"})
fi
cat <<EOF
@ -696,7 +700,7 @@ __vhost_proxy_statement() {
Allow from all
</Proxy>
ProxyVia On
ProxyPass / http://$target/ retry=0
ProxyPass / http://$target/ ${proxy_pass_options[*]}
<Location / >
$(__vhost_creds_statement "$cfg" "$dest" | prefix " ")
ProxyPassReverse /

10
apache/test/vhost

@ -172,6 +172,16 @@ is out part '
</Location>
'
try "
apache_vhost_statement web_proxy ,http, '
target: popo:3333
apache-proxy-pass-options: nocanon
' www.example.com
" "proxy proxy-pass options"
noerror
is out reg 'ProxyPass / http://popo:3333/ nocanon'
##
## ssl
##

Loading…
Cancel
Save