feat: add support for local asset URLs in S3 storage backends

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-04-29 08:12:57 +02:00
parent 84d8a0e3b6
commit 30f260c9bf
2 changed files with 24 additions and 4 deletions
+2 -3
View File
@@ -82,6 +82,7 @@ SECRET_KEY = os.getenv('SECRET_KEY', 'django-insecure-#g((q@lvnkt(j6)2(gvtn0px)r
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = env_bool('DEBUG', True)
S3_ENABLE = env_bool('S3_ENABLE', False)
S3_USE_LOCAL_URLS = env_bool('S3_USE_LOCAL_URLS', False)
ALLOWED_HOSTS = env_list('ALLOWED_HOSTS', [
'192.168.1.142',
@@ -426,6 +427,4 @@ CELERY_RESULT_SERIALIZER = 'json'
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
USE_X_FORWARDED_HOST = True
SECURE_REFERER_POLICY = "strict-origin-when-cross-origin"
print(f"DEBUG: ALLOWED_HOSTS is {ALLOWED_HOSTS}")
SECURE_REFERER_POLICY = "strict-origin-when-cross-origin"