From 709076067b749bc003d003d942712adb40653c17 Mon Sep 17 00:00:00 2001 From: Thai Pangsakulyanont Date: Mon, 2 Feb 2026 17:47:14 +0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B(backend)=20add=20AWS=5FS3=5FSIGNAT?= =?UTF-8?q?URE=5FVERSION=20environment=20variable=20support?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add support for the `AWS_S3_SIGNATURE_VERSION` environment variable to allow configuring S3 signature version for compatibility with S3-compatible storage services like Linode Object Storage. Fixes #1788 Signed-off-by: dtinth on MBP M1 --- docs/env.md | 1 + src/backend/impress/settings.py | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/docs/env.md b/docs/env.md index 1ce94dcd..86ba596c 100644 --- a/docs/env.md +++ b/docs/env.md @@ -21,6 +21,7 @@ These are the environment variables you can set for the `impress-backend` contai | AWS_S3_ENDPOINT_URL | S3 endpoint | | | AWS_S3_REGION_NAME | Region name for s3 endpoint | | | AWS_S3_SECRET_ACCESS_KEY | Access key for s3 endpoint | | +| AWS_S3_SIGNATURE_VERSION | S3 signature version (`s3v4` or `s3`) | s3v4 | | AWS_STORAGE_BUCKET_NAME | Bucket name for s3 endpoint | impress-media-storage | | CACHES_DEFAULT_TIMEOUT | Cache default timeout | 30 | | CACHES_DEFAULT_KEY_PREFIX | The prefix used to every cache keys. | docs | diff --git a/src/backend/impress/settings.py b/src/backend/impress/settings.py index 80d3a149..f3c65e4b 100755 --- a/src/backend/impress/settings.py +++ b/src/backend/impress/settings.py @@ -169,6 +169,11 @@ class Base(Configuration): environ_name="AWS_STORAGE_BUCKET_NAME", environ_prefix=None, ) + AWS_S3_SIGNATURE_VERSION = values.Value( + "s3v4", + environ_name="AWS_S3_SIGNATURE_VERSION", + environ_prefix=None, + ) # Document images DOCUMENT_IMAGE_MAX_SIZE = values.IntegerValue(