diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-12-14 16:47:37 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-12-28 19:42:50 +0100 |
commit | e7649f9cf4f6beda6adb50998db3e57964bd5010 (patch) | |
tree | 51b73f9bebc5587ff20c708105f1d56d0ed73e00 /data/templates | |
parent | a8a019c4f318ba6ad2f83b9b4f605de3830c7b28 (diff) | |
download | vyos-1x-e7649f9cf4f6beda6adb50998db3e57964bd5010.tar.gz vyos-1x-e7649f9cf4f6beda6adb50998db3e57964bd5010.zip |
webproxy: T563: improve handling of cache-peers
Diffstat (limited to 'data/templates')
-rw-r--r-- | data/templates/squid/squid.conf.tmpl | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/data/templates/squid/squid.conf.tmpl b/data/templates/squid/squid.conf.tmpl index 1876146dd..814f94aa7 100644 --- a/data/templates/squid/squid.conf.tmpl +++ b/data/templates/squid/squid.conf.tmpl @@ -100,29 +100,7 @@ forwarded_for off {% if cache_peer is defined and cache_peer is not none %} {% for peer, config in cache_peer.items() %} -{% if not 'type' in webproxy['cache-peer'][peer] %} -{% set p_type = "parent" %} -{% else %} -{% set p_type = webproxy['cache-peer'][peer]['type'] %} -{% endif %} - -{% if not 'http-port' in webproxy['cache-peer'][peer] %} -{% set p_http_port = 3128 %} -{% else %} -{% set p_http_port = webproxy['cache-peer'][peer]['http-port'] %} -{% endif %} - -{% if not 'icp-port' in webproxy['cache-peer'][peer] %} -{% set p_icp_port = 0 %} -{% else %} -{% set p_icp_port = webproxy['cache-peer'][peer]['icp-port'] %} -{% endif %} - -{% if not 'options' in webproxy['cache-peer'][peer] %} -{% set p_options = "no-query default" %} -{% else %} -{% set p_options = webproxy['cache-peer'][peer]['options'] %} -{% endif %} -cache_peer {{ config.address }} {{p_type}} {{p_http_port}} {{p_icp_port}} {{p_options}} +cache_peer {{ config.address }} {{ config.type }} {{ config.http_port }} {{ config.icp_port }} {{ config.options }} {% endfor %} +never_direct allow all {% endif %} |