Skip to content

Commit

Permalink
malawilii media from media.malawilii.org
Browse files Browse the repository at this point in the history
  • Loading branch information
longhotsummer committed Nov 22, 2024
1 parent 3d8e6e3 commit c1a27c3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions malawilii/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,10 @@
LANGUAGES = [
("en", _("English")),
]


if not DEBUG: # noqa
# malawilii 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.malawilii.org"

0 comments on commit c1a27c3

Please sign in to comment.