All runtime configuration for Dotnet-RateLimiter lives inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/nimanikoo/Dotnet-RateLimiter/llms.txt
Use this file to discover all available pages before exploring further.
appsettings.json. The file is intentionally minimal — there are only three top-level sections: Redis, Logging, and AllowedHosts. AddCustomRateLimiter reads the Redis:ConnectionString value at startup to establish the IConnectionMultiplexer singleton and register the health check probe. Everything else follows standard ASP.NET Core conventions.
Default appsettings.json
This is the complete file shipped with the project:
Configuration Reference
The StackExchange.Redis connection string used to connect to your Redis instance. Read by
AddCustomRateLimiter via configuration.GetSection("Redis:ConnectionString").Value.Default: localhost:6379,abortConnect=falseThe abortConnect=false option is significant: it instructs StackExchange.Redis not to throw an exception at startup if Redis is unreachable. The application will start normally and Redis connectivity will be reattempted on first use. Remove this flag in production if you require a hard failure at boot when Redis is unavailable.The minimum log level for all application code that does not match a more specific category filter.Default:
InformationValid values (in ascending severity): Trace, Debug, Information, Warning, Error, Critical, None.Overrides the log level specifically for all ASP.NET Core framework log categories (routing, middleware pipeline, request handling, etc.).Default:
WarningSetting this to Warning suppresses the verbose Information-level framework logs that appear during normal request processing, keeping your log output focused on application-level events.A semicolon-separated list of host headers the application will accept. Used by ASP.NET Core’s host filtering middleware.Default:
* (all hosts allowed)In production, restrict this to your actual hostname(s), for example "api.example.com;www.example.com".Docker Compose Environment Variable Override
When running inside Docker Compose, the Redis service is reachable via the container nameredis rather than localhost. Override the connection string using an environment variable in your compose.yaml:
ASP.NET Core maps environment variables to configuration keys by replacing
__ (double underscore) with :. So Redis__ConnectionString maps to the Redis:ConnectionString configuration key, overriding the value in appsettings.json at runtime without modifying the file.Development vs Production
Development
The defaultappsettings.json targets a local Redis instance, which is suitable for development and Docker Compose setups:
