i18n & Security
bloom_i18n and bloom_security deliver enterprise-grade localization, CORS controls, security headers, and sliding-window rate limiting for Bloom backend applications.
Internationalization with bloom_i18n
bloom_i18n supports standard ICU MessageFormat syntax (pluralization, select/gender cases, argument interpolation) backed by the standard intl package. BloomLocaleMiddleware parses quality-weighted Accept-Language headers:
Security Headers & CORS with bloom_security
bloom_security provides production-hardened middleware for BloomApiRouter:
Sliding-Window IP Rate Limiting
BloomRateLimitMiddleware tracks requests per client IP across configurable sliding time windows. When limits are exceeded, the middleware returns HTTP 429 Too Many Requests with standard X-RateLimit-* and Retry-After headers.
Native WebSocket Upgrade
BloomWebSocketServer and serveWithWebSockets allow serving both standard REST endpoints and realtime WebSocket listeners simultaneously on the same HTTP port.