- Replace image crate's WebP with zenwebp for better quality/speed - Add webp.rs module with configurable quality and method - Update .env.example with WEBP_QUALITY and WEBP_METHOD - Add WebP decode support in image serving pipeline - Add detailed timing logs for WebP conversion
19 lines
568 B
Plaintext
19 lines
568 B
Plaintext
DATABASE_URL=postgres://postgres:postgres@localhost:5432/yggdrasil
|
||
RUST_LOG=info
|
||
|
||
# Rate Limit — 严格限流(登录、注册)
|
||
RATE_LIMIT_STRICT_PER_SEC=1
|
||
RATE_LIMIT_STRICT_BURST=5
|
||
# Rate Limit — 上传限流(图片上传)
|
||
RATE_LIMIT_UPLOAD_PER_SEC=2
|
||
RATE_LIMIT_UPLOAD_BURST=15
|
||
# Rate Limit — 图片访问限流(/uploads/*)
|
||
RATE_LIMIT_IMAGE_PER_SEC=10
|
||
RATE_LIMIT_IMAGE_BURST=50
|
||
|
||
# WebP encoding configuration
|
||
# Quality: 0.0 (smallest) to 100.0 (best), default 85.0
|
||
WEBP_QUALITY=85.0
|
||
# Method: 0 (fastest) to 6 (best quality), default 2
|
||
WEBP_METHOD=2
|