add g/G to the available file measurement units

This commit is contained in:
TheophileDiot 2022-09-30 11:30:09 +02:00
parent d207aa4bf5
commit 5fdcc9e583
1 changed files with 2 additions and 0 deletions

View File

@ -17,6 +17,8 @@ SecRule REQUEST_HEADERS:Content-Type "application/json" \
SecRequestBodyLimit {{ MAX_CLIENT_SIZE[:-1] | int * 1024 }}
{% elif MAX_CLIENT_SIZE.endswith("m") or MAX_CLIENT_SIZE.endswith("M") %}
SecRequestBodyLimit {{ MAX_CLIENT_SIZE[:-1] | int * 1024 * 1024 }}
{% elif MAX_CLIENT_SIZE.endswith("g") or MAX_CLIENT_SIZE.endswith("G") %}
SecRequestBodyLimit {{ MAX_CLIENT_SIZE[:-1] | int * 1024 * 1024 * 1024 }}
{% elif MAX_CLIENT_SIZE.isdigit() %}
SecRequestBodyLimit {{ MAX_CLIENT_SIZE }}
{% else %}