Merge pull request #1947 from dmaes/develop

Add S3_CUSTOM_DOMAIN settings, closes #1943
This commit is contained in:
vabene1111 2022-08-01 16:27:16 +02:00 committed by GitHub
commit 1ab3e57b83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -77,6 +77,7 @@ GUNICORN_MEDIA=0
# S3_QUERYSTRING_AUTH=1 # default true, set to 0 to serve media from a public bucket without signed urls
# S3_QUERYSTRING_EXPIRE=3600 # number of seconds querystring are valid for
# S3_ENDPOINT_URL= # when using a custom endpoint like minio
# S3_CUSTOM_DOMAIN= # when using a CDN/proxy to S3 (see https://github.com/TandoorRecipes/recipes/issues/1943)
# Email Settings, see https://docs.djangoproject.com/en/3.2/ref/settings/#email-host
# Required for email confirmation and password reset (automatically activates if host is set)

View File

@ -411,6 +411,8 @@ if os.getenv('S3_ACCESS_KEY', ''):
if os.getenv('S3_ENDPOINT_URL', ''):
AWS_S3_ENDPOINT_URL = os.getenv('S3_ENDPOINT_URL', '')
if os.getenv('S3_CUSTOM_DOMAIN', ''):
AWS_S3_CUSTOM_DOMAIN = os.getenv('S3_CUSTOM_DOMAIN', '')
MEDIA_URL = os.getenv('MEDIA_URL', '/media/')
MEDIA_ROOT = os.path.join(BASE_DIR, "mediafiles")