From e7649f9cf4f6beda6adb50998db3e57964bd5010 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Mon, 14 Dec 2020 16:47:37 +0100 Subject: webproxy: T563: improve handling of cache-peers --- data/templates/squid/squid.conf.tmpl | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) (limited to 'data/templates/squid') 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 %} -- cgit v1.2.3