|
2 | 2 |
|
3 | 3 | All notable changes to this project will be documented in this file. |
4 | 4 |
|
5 | | -The format is based on [Keep a Changelog](https://keepachangelog.com/en/0.0.3/), |
| 5 | +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), |
6 | 6 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). |
7 | 7 |
|
| 8 | +## [0.1.0] - 2025-10-03 |
| 9 | + |
| 10 | +### Added |
| 11 | +- **Middleware Default Key Extraction**: New `default_key_extraction` parameter for RateLimitMiddleware |
| 12 | +- **Fallback Key Extraction**: New `KeyExtractionType.FALLBACK` for sequential extraction strategies |
| 13 | +- **Helper Functions**: Pre-built fallback strategies via `create_auth_header_fallback()`, `create_api_key_fallback()`, `create_user_id_fallback()` |
| 14 | +- **Enhanced Decorator**: New `key_extraction_strategy` parameter for `@throttle` decorator |
| 15 | +- **Flexible Priority System**: Route-specific > Middleware default > IP fallback |
| 16 | + |
| 17 | +### Enhanced |
| 18 | +- Key extraction logic now supports complex fallback scenarios |
| 19 | +- Middleware can set default extraction strategy for all routes |
| 20 | +- Decorator supports complete KeyExtractionStrategy objects |
| 21 | +- Improved documentation with comprehensive fallback examples |
| 22 | + |
| 23 | +### Features |
| 24 | +- Try multiple extraction methods in sequence (e.g., API key → Auth header → IP) |
| 25 | +- Middleware-level defaults that apply to all routes unless overridden |
| 26 | +- Route-specific strategies override middleware defaults |
| 27 | +- Automatic fallback to IP address if all strategies fail |
| 28 | +- Production-ready fallback patterns for authentication scenarios |
| 29 | + |
| 30 | +### Use Cases |
| 31 | +- Multi-tenant SaaS applications with API key fallbacks |
| 32 | +- Authentication-based rate limiting with IP fallbacks |
| 33 | +- Complex user identification scenarios |
| 34 | +- Graceful degradation for missing headers |
| 35 | + |
8 | 36 | ## [0.0.3] - 2024-10-02 |
9 | 37 |
|
10 | 38 | ### Added |
|
0 commit comments