Skip to content

Commit

Permalink
serve ulii media via cdn
Browse files Browse the repository at this point in the history
  • Loading branch information
longhotsummer committed Jul 6, 2024
1 parent c7a80ff commit e64e959
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ulii/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit e64e959

Please sign in to comment.