Choose a rate limiting key extractor
mainYou can control how requests are identified for rate limiting by providing a KeyExtractor. This allows you to limit by IP, by proxy-provided headers, or globally.
Available extractors:
PeerIpKeyExtractor: (Default) Uses the peer IP address of the request.SmartIpKeyExtractor: Looks for common IP identification headers (in order:x-forwarded-for,x-real-ip,forwarded) and falls back to the peer IP.GlobalKeyExtractor: Uses the same key for all incoming requests, effectively applying a global rate limit.
Custom extractors can be implemented by defining your own KeyExtractor (e.g., for API keys).