yggdrasil/.env.example
xfy 05b9a3a595
Some checks failed
CI / check (push) Failing after 14m38s
CI / build (push) Has been skipped
feat: enable all HTTP compression algorithms by default
- COMPRESSION_ALGORITHMS defaults to 'all' when unset

- Support 'none'/'off' to explicitly disable compression

- Add parse_compression_algorithms helper and unit tests

- Update .env.example comment to reflect new default
2026-06-17 17:03:17 +08:00

39 lines
1.4 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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
# Maximum concurrent sessions per user (default: 5, minimum: 1)
MAX_SESSIONS_PER_USER=5
# Database connection pool size (default: 20)
DB_POOL_SIZE=20
# SSR page cache duration in seconds (default: 3600)
SSR_CACHE_SECS=3600
# Compression algorithms for HTTP responses.
# Comma-separated list, case-insensitive. Supported: gzip, brotli (or br), deflate, zstd.
# Use "all" to enable everything (default when unset); use "none" or "off" to disable.
COMPRESSION_ALGORITHMS=gzip,brotli,deflate,zstd
# Image serving cache headers (hardcoded defaults)
# Uploaded image assets are served with Cache-Control: public, max-age=31536000, immutable.
# Processed variants (?w=, ?format=, etc.) are cached for 24 hours.
# To invalidate a cached raw upload, change its file path.
# To refresh a processed variant, change its processing parameters.