Skip to content

Commit

Permalink
Add ZOPE_FORM_MEMORY_LIMIT environment variable to configure (#129)
Browse files Browse the repository at this point in the history
* Add ZOPE_DOS_PROTECTION environment variable to configure

* Rename variable to ZOPE_FORM_MEMORY_LIMIT
  • Loading branch information
ericof authored Sep 26, 2023
1 parent 7016a5a commit 35a86c5
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions skeleton/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ fi
[ -z ${DEFAULT_ZPUBLISHER_ENCODING+x} ] && export DEFAULT_ZPUBLISHER_ENCODING=utf-8
[ -z ${COMPILE_MO_FILES+x} ] && export COMPILE_MO_FILES=true
[ -z ${DEBUG_MODE+x} ] && export DEBUG_MODE=off
[ -z ${ZOPE_FORM_MEMORY_LIMIT+x} ] && export ZOPE_FORM_MEMORY_LIMIT=4MB


# ZODB ENV Vars
[ -z ${ZODB_CACHE_SIZE+x} ] && export ZODB_CACHE_SIZE=50000
Expand Down
4 changes: 4 additions & 0 deletions skeleton/etc/relstorage.conf
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ default-zpublisher-encoding $(DEFAULT_ZPUBLISHER_ENCODING)
CHAMELEON_CACHE $INSTANCE/var/cache
</environment>

<dos_protection>
form-memory-limit $(ZOPE_FORM_MEMORY_LIMIT)
</dos_protection>

<zodb_db main>
# Main database
cache-size $(ZODB_CACHE_SIZE)
Expand Down
4 changes: 4 additions & 0 deletions skeleton/etc/zeo.conf
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ default-zpublisher-encoding $(DEFAULT_ZPUBLISHER_ENCODING)
CHAMELEON_CACHE $INSTANCE/var/cache
</environment>

<dos_protection>
form-memory-limit $(ZOPE_FORM_MEMORY_LIMIT)
</dos_protection>

<zodb_db main>
# Main database
cache-size $(ZODB_CACHE_SIZE)
Expand Down
4 changes: 4 additions & 0 deletions skeleton/etc/zope.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ default-zpublisher-encoding $(DEFAULT_ZPUBLISHER_ENCODING)
CHAMELEON_CACHE $INSTANCE/var/cache
</environment>

<dos_protection>
form-memory-limit $(ZOPE_FORM_MEMORY_LIMIT)
</dos_protection>

<zodb_db main>
# Main database
cache-size $(ZODB_CACHE_SIZE)
Expand Down

0 comments on commit 35a86c5

Please sign in to comment.