diff --git a/ulii/settings.py b/ulii/settings.py index d0bdc5883..49eab793b 100644 --- a/ulii/settings.py +++ b/ulii/settings.py @@ -35,3 +35,10 @@ "center-arbitration-dispute-resolution-uganda": "UGCADER", "tax-appeals-tribunal-uganda": "UGTAT", } + + +if not DEBUG: # noqa + # ULII media files are stored on S3 and served via a Cloudflare CDN (via copying to R2). + # We can therefore set long-lived cache headers and serve them from a custom domain. + AWS_S3_OBJECT_PARAMETERS = {"CacheControl": f"max-age={86400*5}"} + AWS_S3_CUSTOM_DOMAIN = "media.ulii.org"