mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
Add v2.0 "max-object-size" option (#1458)
This commit is contained in:
committed by
Frank Wall
parent
440d907964
commit
5037167ac9
@@ -337,6 +337,12 @@
|
||||
<type>text</type>
|
||||
<help><![CDATA[Define the maximum expiration duration. Cache-Control response headers will be respected if they are less than this value. The default value is 60 seconds.]]></help>
|
||||
</field>
|
||||
<field>
|
||||
<id>haproxy.general.cache.maxObjectSize</id>
|
||||
<label>Maximum Object Size (bytes)</label>
|
||||
<type>text</type>
|
||||
<help><![CDATA[Define the maximum size of the objects to be cached. Must not be greater than an half of the maximum size of the cache. If not set, it equals to a 256th of the cache size. All objects with sizes larger than this value will not be cached.]]></help>
|
||||
</field>
|
||||
</subtab>
|
||||
</tab>
|
||||
</form>
|
||||
|
||||
@@ -343,6 +343,12 @@
|
||||
<Required>N</Required>
|
||||
<ValidationMessage>Please specify a value between 1 and 3600.</ValidationMessage>
|
||||
</maxAge>
|
||||
<maxObjectSize type="IntegerField">
|
||||
<MinimumValue>1</MinimumValue>
|
||||
<MaximumValue>2146435072</MaximumValue>
|
||||
<Required>N</Required>
|
||||
<ValidationMessage>Please specify a value between 1 and 2146435072.</ValidationMessage>
|
||||
</maxObjectSize>
|
||||
</cache>
|
||||
</general>
|
||||
<frontends>
|
||||
|
||||
@@ -884,6 +884,9 @@ cache opnsense-haproxy-cache
|
||||
{% if OPNsense.HAProxy.general.cache.maxAge|default("") != "" %}
|
||||
max-age {{OPNsense.HAProxy.general.cache.maxAge}}
|
||||
{% endif %}
|
||||
{% if OPNsense.HAProxy.general.cache.maxObjectSize|default("") != "" %}
|
||||
max-object-size {{OPNsense.HAProxy.general.cache.maxObjectSize}}
|
||||
{% endif %}
|
||||
{%- endif -%}
|
||||
|
||||
{# ############################### #}
|
||||
|
||||
Reference in New Issue
Block a user