mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-16 09:34:39 +00:00
web proxy: lock down caching completely if set to off
PR: https://forum.opnsense.org/index.php?topic=4152.0
This commit is contained in:
parent
397c95f89c
commit
d3e27cface
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user