From 2ac412a30cd169b970144d8b43587b2394e762f3 Mon Sep 17 00:00:00 2001 From: Doug Hoke Date: Thu, 6 Jul 2023 03:21:40 -0400 Subject: [PATCH] Add limits (#42) * initial changes - testing still required * Update Dockerfile to match version 16 --------- Co-authored-by: Malte --- README.md | 24 +++++++++++++----------- config.py | 2 ++ 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 5c0e1e8..4137eda 100644 --- a/README.md +++ b/README.md @@ -67,14 +67,16 @@ Some metrics are available at `GET /metrics`. ## Environment variables -| Environment variable | Required | Default | Purpose | -|----------------------|----------|---------|------------------------------------------| -| LOGLEVEL | false | INFO | Loglevel | -| LOGJSON | false | True | If enabled, most logs are in JSON format | -| CLAMD_HOST | false | clamav | Hostname where to reach clamav container | -| CLAMD_PORT | false | 3310 | Port where to reach clamav container | -| LISTEN_HOST | false | 0.0.0.0 | IP to listen on inside container | -| LISTEN_PORT | false | 8080 | Port to listen on inside container | -| AUTH_USERNAME | false | | Username for optional basic auth | -| AUTH_PASSWORD | false | | Password for optional basic auth | -| MAX_CONTENT_LENGTH | false | 16 MB | The maximum request size in bytes | +| Environment variable | Required | Default | Purpose | +|----------------------|----------|----------|---------------------------------------------| +| LOGLEVEL | false | INFO | Loglevel | +| LOGJSON | false | True | If enabled, most logs are in JSON format | +| CLAMD_HOST | false | clamav | Hostname where to reach clamav container | +| CLAMD_PORT | false | 3310 | Port where to reach clamav container | +| LISTEN_HOST | false | 0.0.0.0 | IP to listen on inside container | +| LISTEN_PORT | false | 8080 | Port to listen on inside container | +| AUTH_USERNAME | false | | Username for optional basic auth | +| AUTH_PASSWORD | false | | Password for optional basic auth | +| MAX_CONTENT_LENGTH | false | 16777216 | The maximum request size in bytes (16MB) | +| RESPONSE_TIMEOUT | false | 60 | Override default response timeout for Flask | +| BODY_TIMEOUT | false | 60 | Override default body timeout for Flask | diff --git a/config.py b/config.py index edf80d9..80688d8 100644 --- a/config.py +++ b/config.py @@ -9,3 +9,5 @@ AUTH_PASSWORD = os.environ.get('AUTH_PASSWORD', None) MAX_CONTENT_LENGTH = int(os.environ.get('MAX_CONTENT_LENGTH', 16777216)) +RESPONSE_TIMEOUT = int(os.environ.get('RESPONSE_TIMEOUT', 60)) +BODY_TIMEOUT = int(os.environ.get('BODY_TIMEOUT', 60))