[#141] Support additional options for Proxypass (#142)

* Add support for proxy pass target options

* Add example usage
This commit is contained in:
Martin Jackson 2016-05-23 18:32:12 +01:00 committed by Forrest
parent eaffddb0d0
commit b1640f4f3d
2 changed files with 3 additions and 1 deletions

View File

@ -50,11 +50,12 @@
{% set proxyvals = {
'ProxyPassSource': proxyargs.get('ProxyPassSource', '/'),
'ProxyPassTarget': proxyargs.get('ProxyPassTarget', 'https://{0}'.format(sitename)),
'ProxyPassTargetOptions': proxyargs.get('ProxyPassTargetOptions', ''),
'ProxyPassReverseSource': proxyargs.get('ProxyPassReverseSource', '/'),
'ProxyPassReverseTarget': proxyargs.get('ProxyPassReverseTarget', site.get('ProxyPassTarget', 'https://{0}'.format(sitename))),
} %}
######### {{proxy}} #########
ProxyPass {{ proxyvals.ProxyPassSource }} {{ proxyvals.ProxyPassTarget }}
ProxyPass {{ proxyvals.ProxyPassSource }} {{ proxyvals.ProxyPassTarget }} {{ proxyvals.ProxyPassTargetOptions }}
ProxyPassReverse {{ proxyvals.ProxyPassReverseSource }} {{ proxyvals.ProxyPassReverseTarget }}
{% endfor %}
{% if site.get('Formula_Append') %}

View File

@ -90,6 +90,7 @@ apache:
# my sample route:
# ProxyPassSource: '/'
# ProxyPassTarget: 'http://www.example.net'
# ProxyPassTargetOptions: 'connectiontimeout=5 timeout=30'
# ProxyPassReverseSource: '/'
# ProxyPassReverseTarget: 'http://www.example.net'