Jul 14 - Using CDN - Phase 1

This commit is contained in:
2026-07-14 11:49:25 -04:00
parent 42f9e4670c
commit bab564c23e
9 changed files with 180 additions and 30 deletions
+5
View File
@@ -37,6 +37,11 @@ class Config:
MAX_CONTENT_LENGTH = 50 * 1024 * 1024 # 50 MB
ALLOWED_EXTENSIONS = {'png', 'jpg', 'jpeg', 'gif'}
# ── Storage backend (R2 migration) ──────────────────────────────────────
# 'local' (default) = files under app/static/uploads, served via url_for('static').
# 's3' = Cloudflare R2 / S3-compatible (added Phase 2). Flip via env only.
STORAGE_BACKEND = os.environ.get('STORAGE_BACKEND', 'local')
# ── Session / cookies ───────────────────────────────────────────────────
PERMANENT_SESSION_LIFETIME = timedelta(hours=24)
# Secure by default — subclasses must explicitly opt out for local dev.