From 0f4fc8cb28e64e0838cd383b022725f37ac8e2db Mon Sep 17 00:00:00 2001 From: Olivier Chafik Date: Thu, 24 Oct 2024 18:59:37 +0100 Subject: [PATCH] `agent`: fix no-cache issue in squid for brave tool --- examples/agent/squid/conf/squid.conf | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/examples/agent/squid/conf/squid.conf b/examples/agent/squid/conf/squid.conf index 90f660feb..2c0daf1ca 100755 --- a/examples/agent/squid/conf/squid.conf +++ b/examples/agent/squid/conf/squid.conf @@ -13,12 +13,16 @@ ssl_bump bump all # Forbid access to the host. # If you want to allow tools to call llama-server on the host (e.g. embeddings, or recursive thoughts), # you can comment out the next two lines. -acl blocked_sites dstdomain host.docker.internal host-gateway +acl blocked_sites dstdomain host.docker.internal host-gateway docker.for.mac.localhost docker.for.mac.host.internal http_access deny blocked_sites # Allow all other traffic (you may want to restrict this in a production environment) http_access allow all +request_header_access Cache-Control deny all +request_header_add Cache-Control "no-cache" all +# refresh_pattern ^.*$ 0 0% 0 + # Cache Python packages refresh_pattern -i ($|\.)(files\.pythonhosted\.org|pypi\.org)/.*?\.(whl|zip|tar\.gz)$ 10080 90% 43200 reload-into-ims @@ -31,6 +35,7 @@ cache_mem 200 MB maximum_object_size 1024 MB # Configure logs +strip_query_terms off cache_log /var/log/squid/cache.log access_log /var/log/squid/access.log squid cache_store_log none