Skip to content

Commit 35a86c5

Browse files
authored
Add ZOPE_FORM_MEMORY_LIMIT environment variable to configure (#129)
* Add ZOPE_DOS_PROTECTION environment variable to configure * Rename variable to ZOPE_FORM_MEMORY_LIMIT
1 parent 7016a5a commit 35a86c5

File tree

4 files changed

+14
-0
lines changed

4 files changed

+14
-0
lines changed

skeleton/docker-entrypoint.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ fi
2727
[ -z ${DEFAULT_ZPUBLISHER_ENCODING+x} ] && export DEFAULT_ZPUBLISHER_ENCODING=utf-8
2828
[ -z ${COMPILE_MO_FILES+x} ] && export COMPILE_MO_FILES=true
2929
[ -z ${DEBUG_MODE+x} ] && export DEBUG_MODE=off
30+
[ -z ${ZOPE_FORM_MEMORY_LIMIT+x} ] && export ZOPE_FORM_MEMORY_LIMIT=4MB
31+
3032

3133
# ZODB ENV Vars
3234
[ -z ${ZODB_CACHE_SIZE+x} ] && export ZODB_CACHE_SIZE=50000

skeleton/etc/relstorage.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ default-zpublisher-encoding $(DEFAULT_ZPUBLISHER_ENCODING)
1313
CHAMELEON_CACHE $INSTANCE/var/cache
1414
</environment>
1515

16+
<dos_protection>
17+
form-memory-limit $(ZOPE_FORM_MEMORY_LIMIT)
18+
</dos_protection>
19+
1620
<zodb_db main>
1721
# Main database
1822
cache-size $(ZODB_CACHE_SIZE)

skeleton/etc/zeo.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ default-zpublisher-encoding $(DEFAULT_ZPUBLISHER_ENCODING)
1313
CHAMELEON_CACHE $INSTANCE/var/cache
1414
</environment>
1515

16+
<dos_protection>
17+
form-memory-limit $(ZOPE_FORM_MEMORY_LIMIT)
18+
</dos_protection>
19+
1620
<zodb_db main>
1721
# Main database
1822
cache-size $(ZODB_CACHE_SIZE)

skeleton/etc/zope.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ default-zpublisher-encoding $(DEFAULT_ZPUBLISHER_ENCODING)
1010
CHAMELEON_CACHE $INSTANCE/var/cache
1111
</environment>
1212

13+
<dos_protection>
14+
form-memory-limit $(ZOPE_FORM_MEMORY_LIMIT)
15+
</dos_protection>
16+
1317
<zodb_db main>
1418
# Main database
1519
cache-size $(ZODB_CACHE_SIZE)

0 commit comments

Comments
 (0)