Skip to content

Commit

Permalink
docker: allow to control import/export rate limiting parameters
Browse files Browse the repository at this point in the history
The newly introduces environment variables are IMPORT_EXPORT_RATE_LIMIT_WINDOW
and IMPORT_EXPORT_MAX_REQ_PER_IP.
  • Loading branch information
muxator committed Apr 14, 2020
1 parent c9d55c8 commit 5acbdb8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions doc/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ Available options:
* `USER_PASSWORD`: the password for the first user `user` (leave unspecified if you do not want to create it)
* `TRUST_PROXY`: set to `true` if you are using a reverse proxy in front of Etherpad (for example: Traefik for SSL termination via Let's Encrypt). This will affect security and correctness of the logs if not done
* `IMPORT_MAX_FILE_SIZE`: maximum allowed file size when importing a pad, in bytes. Default: 52428800 (50 MB)
* `IMPORT_EXPORT_MAX_REQ_PER_IP`: maximum number of import/export calls per IP. Default: 10
* `IMPORT_EXPORT_RATE_LIMIT_WINDOW`: the call rate for import/export requests will be estimated in this time window (in milliseconds). Default: 90000 ms
* `LOGLEVEL`: valid values are `DEBUG`, `INFO`, `WARN` and `ERROR`

### Examples
Expand Down
4 changes: 2 additions & 2 deletions settings.json.docker
Original file line number Diff line number Diff line change
Expand Up @@ -419,10 +419,10 @@
*/
"importExportRateLimiting": {
// duration of the rate limit window (milliseconds)
"windowMs": 90000,
"windowMs": "${IMPORT_EXPORT_RATE_LIMIT_WINDOW:90000}",

// maximum number of requests per IP to allow during the rate limit window
"max": 10
"max": "${IMPORT_EXPORT_MAX_REQ_PER_IP:10}"
},

/*
Expand Down

0 comments on commit 5acbdb8

Please sign in to comment.