[#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 = { {% set proxyvals = {
'ProxyPassSource': proxyargs.get('ProxyPassSource', '/'), 'ProxyPassSource': proxyargs.get('ProxyPassSource', '/'),
'ProxyPassTarget': proxyargs.get('ProxyPassTarget', 'https://{0}'.format(sitename)), 'ProxyPassTarget': proxyargs.get('ProxyPassTarget', 'https://{0}'.format(sitename)),
'ProxyPassTargetOptions': proxyargs.get('ProxyPassTargetOptions', ''),
'ProxyPassReverseSource': proxyargs.get('ProxyPassReverseSource', '/'), 'ProxyPassReverseSource': proxyargs.get('ProxyPassReverseSource', '/'),
'ProxyPassReverseTarget': proxyargs.get('ProxyPassReverseTarget', site.get('ProxyPassTarget', 'https://{0}'.format(sitename))), 'ProxyPassReverseTarget': proxyargs.get('ProxyPassReverseTarget', site.get('ProxyPassTarget', 'https://{0}'.format(sitename))),
} %} } %}
######### {{proxy}} ######### ######### {{proxy}} #########
ProxyPass {{ proxyvals.ProxyPassSource }} {{ proxyvals.ProxyPassTarget }} ProxyPass {{ proxyvals.ProxyPassSource }} {{ proxyvals.ProxyPassTarget }} {{ proxyvals.ProxyPassTargetOptions }}
ProxyPassReverse {{ proxyvals.ProxyPassReverseSource }} {{ proxyvals.ProxyPassReverseTarget }} ProxyPassReverse {{ proxyvals.ProxyPassReverseSource }} {{ proxyvals.ProxyPassReverseTarget }}
{% endfor %} {% endfor %}
{% if site.get('Formula_Append') %} {% if site.get('Formula_Append') %}

View File

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