Upload beautify
This commit is contained in:
32
docs/avatar-cdn-config-notes.md
Normal file
32
docs/avatar-cdn-config-notes.md
Normal file
@@ -0,0 +1,32 @@
|
||||
# Avatar CDN Config Notes
|
||||
|
||||
This project serves avatars from the avatar CDN domain.
|
||||
|
||||
## Required env variables
|
||||
|
||||
- `AVATAR_CDN_URL=https://file.skinbase.org`
|
||||
- `AVATAR_DISK=s3` (production)
|
||||
- `AVATAR_WEBP_QUALITY=85`
|
||||
|
||||
## Delivery format
|
||||
|
||||
Avatars are rendered via:
|
||||
|
||||
- `https://file.skinbase.org/avatars/{user_id}/{size}.webp?v={avatar_hash}`
|
||||
|
||||
Sizes generated server-side:
|
||||
|
||||
- `32`, `64`, `128`, `256`, `512`
|
||||
|
||||
## Cache policy
|
||||
|
||||
Storage writes must set:
|
||||
|
||||
- `Cache-Control: public, max-age=31536000, immutable`
|
||||
|
||||
Hash-based query versioning (`?v={avatar_hash}`) handles cache busting.
|
||||
|
||||
## Production rule
|
||||
|
||||
- Production avatar storage must use object storage (`s3` / R2-compatible disk).
|
||||
- Local/public disks are for development only.
|
||||
Reference in New Issue
Block a user