Skip to content

Commit

Permalink
web proxy: lock down caching completely if set to off
Browse files Browse the repository at this point in the history
  • Loading branch information
fichtner committed Jan 9, 2017
1 parent 397c95f commit d3e27cf
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/opnsense/service/templates/OPNsense/Proxy/squid.conf
Original file line number Diff line number Diff line change
Expand Up @@ -264,18 +264,18 @@ icap_enable off

{% include "OPNsense/Proxy/squid.user.post_auth.conf" ignore missing with context %}

{% if helpers.exists('OPNsense.proxy.general.cache.local') %}
{% if helpers.exists('OPNsense.proxy.general.cache.local') and OPNsense.proxy.general.cache.local.enabled == '1' %}
cache_mem {{ OPNsense.proxy.general.cache.local.cache_mem|default('256') }} MB
{% if OPNsense.proxy.general.cache.local.maximum_object_size|default('') != '' %}
{% if OPNsense.proxy.general.cache.local.maximum_object_size|default('') != '' %}
maximum_object_size {{OPNsense.proxy.general.cache.local.maximum_object_size}} MB
{% if OPNsense.proxy.general.cache.local.maximum_object_size|int > 4 %}
{% if OPNsense.proxy.general.cache.local.maximum_object_size|int > 4 %}
cache_replacement_policy heap LFUDA
{% endif %}
{% endif %}
{% if OPNsense.proxy.general.cache.local.enabled == '1' %}
# Uncomment and adjust the following to add a disk cache directory.
cache_dir ufs {{OPNsense.proxy.general.cache.local.directory}} {{OPNsense.proxy.general.cache.local.size}} {{OPNsense.proxy.general.cache.local.l1}} {{OPNsense.proxy.general.cache.local.l2}}
{% endif %}
cache_dir ufs {{OPNsense.proxy.general.cache.local.directory}} {{OPNsense.proxy.general.cache.local.size}} {{OPNsense.proxy.general.cache.local.l1}} {{OPNsense.proxy.general.cache.local.l2}}
{% else %}
cache deny all
cache_mem 0
{% endif %}

# Leave coredumps in the first cache dir
Expand Down

0 comments on commit d3e27cf

Please sign in to comment.